Possum Posted December 14, 2007 Share Posted December 14, 2007 Hi I am trying to to get a contract.... This what I have to do.. I have uploaded a web page that I want to E-mail the contents of to subscribed customers. Their E-Mail addresses are in a MySql data base. Is it possible to have this page Emailed to them. I know I could send link but that is not want the client wants. I know I could also send the E-Mails from my computer. I am trying to give the client freedom.. cheers Possum.. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted December 14, 2007 Share Posted December 14, 2007 look up mail() on php.net Quote Link to comment Share on other sites More sharing options...
Possum Posted December 15, 2007 Author Share Posted December 15, 2007 Ive downloaded the php file and am reading it.. thank you.... The mail() function allows you to send mail. cheers Possum.. Quote Link to comment Share on other sites More sharing options...
Possum Posted December 15, 2007 Author Share Posted December 15, 2007 Mailing List How I see it So Far... AIM I wish to create a mailing list script. So I can mail to subscribed people an E-Mail with graphics. The graphics may or may not be links to graphic on a web server. REQUIREMENTS Data base of E-Mail addresses, names, other important info Template of E-Mail to be sent. WHAT I KNOW SO FAR I need to use the The mail() function. There are 4 fields in the mail() function. (Is the Right?) Example mail($to,"Comments From Your Site",$message,"From: $email\n"); $to "Comments From Your Site", $message "From: $email\n"; Question Can the $message field include and post graphics. As I am a Newbie this will be a big project for me. I hope how I am doing this on the phpfreaks forums is OK with everyone.. Quote Link to comment Share on other sites More sharing options...
corbin Posted December 15, 2007 Share Posted December 15, 2007 http://www.php.net/manual/en/function.mail.php With something like example 4, you could use <img src="" />.... Of course some email clients block emails from some addresses..... Oh, it's also worth noting this quote: Note: It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient. For the sending of large amounts of email, see the » PEAR::Mail, and » PEAR::Mail_Queue packages. Quote Link to comment Share on other sites More sharing options...
Possum Posted December 15, 2007 Author Share Posted December 15, 2007 Thank you I see this is a larger project than I realize. I will be spending time on the pear site I think cheers Possum... Quote Link to comment Share on other sites More sharing options...
play_ Posted December 15, 2007 Share Posted December 15, 2007 Can the $message field include and post graphics. Yes. You will also need headers to be able to include images. (make sure you use absolut paths). You can find the html headers in the link corbin posted Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted December 15, 2007 Share Posted December 15, 2007 if its a consistent mass mailer meanign the body is the same, why not just send it to your self and BCC everyone else? Quote Link to comment Share on other sites More sharing options...
immortality Posted December 15, 2007 Share Posted December 15, 2007 hello i can help u in this prob.. look 1-u have a table that contains all the emails of ur users that's true; 2- u have to create another table let's call it content_tbl and this tabel has just one column and one field called content_msg has a longtext as type. 3-when u make ur design u have to upload it to ur website to be online. 4-in the form of ur massmail(newsletter) u have to use like this editor(html editor: u can find it throught this link http://www.dynamicdrive.com/dynamicindex16/openwysiwyg/index.htm) . 5- when u want to send the design u made.open the design online where u upload it and select it all and copy it and then go to ur editor u have made and paste it there.All the design will appear normally. 6-when u click on the send button ur php script have to do : 6.1-post the content of the editor and insert it into content_tbl.content_msg then in the same script read it from the table content_tbl and put it in the variable $message and then make a loop to send it to all ur clients mail function will look like this : mail($to, $subject, $msg, $headers) and dont forget the header of the mail function is html like this : $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: <'.$from.'>' . "\r\n"; try it . it really works properly. Quote Link to comment Share on other sites More sharing options...
Possum Posted December 16, 2007 Author Share Posted December 16, 2007 Thx Everyone....for your advice.. Cheers Possum Quote Link to comment Share on other sites More sharing options...
Possum Posted December 17, 2007 Author Share Posted December 17, 2007 Hi I also found http://www.phplist.com/ which seems very promising as well. Cheers Possum Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.