[PHP] Sending Email via SMTP account using PHP
Hi, I'm looking for a good example for using a real SMTP account to send email from, such as serv...@somai.com where there is a user password and smtp server available. Please advise with a good example to reuse, Thanks Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending Email via SMTP account using PHP
On Wed, May 18, 2011 at 03:17, Eli Orr (Office) eli@logodial.com wrote: Hi, I'm looking for a good example for using a real SMTP account to send email from, such as serv...@somai.com where there is a user password and smtp server available. Please advise with a good example to reuse, Try this: http://links.parasane.net/boqp -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending Email via SMTP account using PHP
Thanks Daniel! It works perfect. Eli On 18/05/2011 17:47, Daniel Brown wrote: On Wed, May 18, 2011 at 03:17, Eli Orr (Office)eli@logodial.com wrote: Hi, I'm looking for a good example for using a real SMTP account to send email from, such as serv...@somai.com where there is a user password and smtp server available. Please advise with a good example to reuse, Try this: http://links.parasane.net/boqp -- Best Regards, *Eli Orr* CTO Founder *LogoDial Ltd.* M:+972-54-7379604 O:+972-74-703-2034 F: +972-77-3379604 Plaut 10, Rehovot, Israel Email: _Eli.Orr@LogoDial.com_ Skype: _eliorr.com_
[PHP] sending email
When I use the mail function on a linux server, how is the email sent? Does sendmail act alone or does it use SMTP? Thanks Marc
Re: [PHP] sending email
On Wednesday 15 December 2010, Marc Fromm marc.fr...@wwu.edu wrote: When I use the mail function on a linux server, how is the email sent? Does sendmail act alone or does it use SMTP? sendmail itself (or the replacement install, probably postfix or qmail) is an MTA itself, so... it do not requires an SMTP server. You need to use SMTP server, you can try phpmailer, swift mailer and related packages third party PHP libraries. You will need them, for example, if your SMTP server requires authentication. Thanks Marc Best regards, -- Daniel Molina Wegener dmw [at] coder [dot] cl System Programmer Web Developer Phone: +56 (2) 979-0277 | Blog: http://coder.cl/ signature.asc Description: This is a digitally signed message part.
Re: [PHP] sending email with php
http://articles.sitepoint.com/article/code-html-email-newsletters is a straight-ahead overview of what you can/should/cant/shouldn't do in HTML e-mails. Or check out: http://www.devshed.com/c/a/PHP/Composing-Messages-in-HTML-for-MIME-Email-with-PHP/ for some heavy-duty mail classes (be sure to check the See Also section for the full story). I also referenced the following: http://www.wilsonweb.com/wmt5/html-email-multi.htm on the basics of sending multi-part e-mail (ie. plain text AND HTML). HTH. George On 23-Dec-09, at 1:58 PM, Sudhakar wrote: ?php $headers = Content-type: text/html; charset=iso-8859-1; $to=myemailaddress; $subject=Email Newsletter; $message = '!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleEmail Newsletter/title meta http-equiv=Content-Type content=text/html; charset=utf-8 / meta name=robots content=noindex, nofollow / link rel=stylesheet type=text/css href=style.css / /head body div id=wrapper div id=topmenu /div div id=content div class=leftcolumn /div div class=rightcolumn /div /div div id=footer /div /div /body /html'; if(! mail($to, $subject, $message, $headers)){ echo There was an error is sending the email; } else{ echo The email has been sent; } ? hi my question is about send an email with php like a newsletter, when we read a newsletter email its similar to a webpage which contains content, images, css and other elements i created a static webpage initially with html css and images folder after creating the page i wanted to test to see how it would look if i were to send this as an email like a newsletter. so i have created a php file with $headers = Content-type: text/html; charset=iso-8859-1; $to=myemailaddress; $subject=Email Newsletter; and $message as mentioned above has the entire html code as i used it in my static html page i also copied the style.css in the server and created images folder and copied all the images i used in my static page to the server. i created a separate folder in my webserver called newsletter and copied the php file, css file and images folder with the images i used when i accessed the index.php as http://website.com/emailnewsletter i am getting a message that The email has been sent and i am getting the email however my question is when i open this email the styles and images are not being applied and i see only the text in the static page i created. can someone let me know how i can fix this so that when i open the email it would look like the static page i created with all the styles applies and images displayed is this only possible by using specialized email softwares or can it be done by php as well with the logic used. any help will be appreciated. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sending email with php
?php $headers = Content-type: text/html; charset=iso-8859-1; $to=myemailaddress; $subject=Email Newsletter; $message = '!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleEmail Newsletter/title meta http-equiv=Content-Type content=text/html; charset=utf-8 / meta name=robots content=noindex, nofollow / link rel=stylesheet type=text/css href=style.css / /head body div id=wrapper div id=topmenu /div div id=content div class=leftcolumn /div div class=rightcolumn /div /div div id=footer /div /div /body /html'; if(! mail($to, $subject, $message, $headers)){ echo There was an error is sending the email; } else{ echo The email has been sent; } ? hi my question is about send an email with php like a newsletter, when we read a newsletter email its similar to a webpage which contains content, images, css and other elements i created a static webpage initially with html css and images folder after creating the page i wanted to test to see how it would look if i were to send this as an email like a newsletter. so i have created a php file with $headers = Content-type: text/html; charset=iso-8859-1; $to=myemailaddress; $subject=Email Newsletter; and $message as mentioned above has the entire html code as i used it in my static html page i also copied the style.css in the server and created images folder and copied all the images i used in my static page to the server. i created a separate folder in my webserver called newsletter and copied the php file, css file and images folder with the images i used when i accessed the index.php as http://website.com/emailnewsletter i am getting a message that The email has been sent and i am getting the email however my question is when i open this email the styles and images are not being applied and i see only the text in the static page i created. can someone let me know how i can fix this so that when i open the email it would look like the static page i created with all the styles applies and images displayed is this only possible by using specialized email softwares or can it be done by php as well with the logic used. any help will be appreciated. thanks
Re: [PHP] sending email with php
Hi Suhakar, link rel=stylesheet type=text/css href=style.css / Relative URLs won't work - when it's rendered inside the e-mail client, the relative URL has no meaning (I believe Outlook renders relative URLs relative to the temporary directory the HTML is being rendered in.) Other clients may do it relative to an imap:// URL. Try uploading the images and stylesheet to your website and putting them within the newsletter as absolute URLs (including the images) - e.g. link rel=stylesheet type=text/css href=http://www.yourwebsite.com/style.css; / Also I know this is OT and is completely up to you, but remember to include a plain-text part, and also realise that a lot of mail clients don't render images/stylesheets by default - therefore straight after the body tag before the rest of the content, put a link to an external website where recipients can view the content online. Regards, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sending email with php
another point worth noting... most of the major email clients does not display external css/images by default. The user will have to grant permission explicitly.
Re: [PHP] sending email with php
No. You must have noticed gmail saying images are blocked from .. . This is done to prevent spammers from knowing if your email is authentic or not. Moreover you must have also noticed that all the news letters have a link pointing to a web page version of the newsletter.
Re: [PHP] Sending email w/ attachments
Check out this link http://www.learnphp-tutorial.com/Email.cfm On Tue, Aug 11, 2009 at 8:52 AM, Skip Evans s...@bigskypenguin.com wrote: Bastien Koert wrote: Use PHPMailer or one of the other classes available...makes life so much easier eric cartman Kick Ass!!! /eric cartman Yes! Wow! Was that a breeze! That class rocks! Thanks tons, Bastien! I have to admit when I first saw your reply I thought, Oh, man, another class to learn? But I know this is so close to working. I look at the sample and thought, This looks easy, and had it working in no time. Big thanks again! Attachments were a big deal here and this makes it a breeze, AND it looks like multiple attachments would be no problem? Very cool! Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Devendra Jadhav
Re: [PHP] Sending email w/ attachments
Hi, Very cool! I'll take that as a compliment... :-) -- Richard Heyes HTML5 graphing: RGraph - www.rgraph.net (updated 8th August) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email w/ attachments
On Aug 10, 2009, at 11:22 PM, Skip Evans s...@bigskypenguin.com wrote: Bastien Koert wrote: Use PHPMailer or one of the other classes available...makes life so much easier eric cartman Kick Ass!!! /eric cartman Yes! Wow! Was that a breeze! That class rocks! Thanks tons, Bastien! I have to admit when I first saw your reply I thought, Oh, man, another class to learn? But I know this is so close to working. I look at the sample and thought, This looks easy, and had it working in no time. Big thanks again! Attachments were a big deal here and this makes it a breeze, AND it looks like multiple attachments would be no problem? Very cool! Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut Yep, I created a wrapper for the class and pass in attachments as an array. Then just loop thru the array with the attachment code. It's very easy. Bastien Sent from my iPod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email w/ attachments
Hi, ... Sorry, quoted wrong email. Oopsy... -- Richard Heyes HTML5 graphing: RGraph - www.rgraph.net (updated 8th August) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sending email w/ attachments
Hey all, Trying to send emails with attachments, first try at this. And am trying to adapt sample code I found here: http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php Trying this: ($data contains the contents of the file; I've verified this) $hash = md5(date('r', time())); $attachment = chunk_split(base64_encode($data)); $body_attachment = --PHP-mixed-$hash--\n . Content-Type: application/octet-stream; name=\$filename\\r\n . Content-Transfer-Encoding: base64\n . Content-Disposition: attachment\n. $attachment . \n . --PHP-mixed-$hash--\n; I then append $attachment this to the end of the email body and send it on. I've verified it is reading the file properly, in this test case it is a place text file. But I've tried a PDF and that did not work as well. What happens is the email comes through and shows an attachment paper clip icon in Thunderbird, but when the email is clicked on the icon disappears and the email is empty, even the body is not there and no attachment either. A final question I have is does the content-type value need to change for text files, Word Docs, PDFs, Excel files, etc, or is there one type that can handle any file type? Any help would be great. I'm rather stuck and floundering here. Thanks, Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email w/ attachments
On Mon, Aug 10, 2009 at 9:49 PM, Skip Evanss...@bigskypenguin.com wrote: Hey all, Trying to send emails with attachments, first try at this. And am trying to adapt sample code I found here: http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php Trying this: ($data contains the contents of the file; I've verified this) $hash = md5(date('r', time())); $attachment = chunk_split(base64_encode($data)); $body_attachment = --PHP-mixed-$hash--\n . Content-Type: application/octet-stream; name=\$filename\\r\n . Content-Transfer-Encoding: base64\n . Content-Disposition: attachment\n. $attachment . \n . --PHP-mixed-$hash--\n; I then append $attachment this to the end of the email body and send it on. I've verified it is reading the file properly, in this test case it is a place text file. But I've tried a PDF and that did not work as well. What happens is the email comes through and shows an attachment paper clip icon in Thunderbird, but when the email is clicked on the icon disappears and the email is empty, even the body is not there and no attachment either. A final question I have is does the content-type value need to change for text files, Word Docs, PDFs, Excel files, etc, or is there one type that can handle any file type? Any help would be great. I'm rather stuck and floundering here. Thanks, Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Use PHPMailer or one of the other classes available...makes life so much easier -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email w/ attachments
Funny, I just had to figure out today how to nicely do HTML e-mails. I ended up using PEAR:Mail_mime, and it worked pretty well. It will also work for your attachments. I believe that PHP itself recommends it on their mail() function reference page. Adam. On Mon, Aug 10, 2009 at 6:49 PM, Skip Evanss...@bigskypenguin.com wrote: Hey all, Trying to send emails with attachments, first try at this. And am trying to adapt sample code I found here: http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php Trying this: ($data contains the contents of the file; I've verified this) $hash = md5(date('r', time())); $attachment = chunk_split(base64_encode($data)); $body_attachment = --PHP-mixed-$hash--\n . Content-Type: application/octet-stream; name=\$filename\\r\n . Content-Transfer-Encoding: base64\n . Content-Disposition: attachment\n. $attachment . \n . --PHP-mixed-$hash--\n; I then append $attachment this to the end of the email body and send it on. I've verified it is reading the file properly, in this test case it is a place text file. But I've tried a PDF and that did not work as well. What happens is the email comes through and shows an attachment paper clip icon in Thunderbird, but when the email is clicked on the icon disappears and the email is empty, even the body is not there and no attachment either. A final question I have is does the content-type value need to change for text files, Word Docs, PDFs, Excel files, etc, or is there one type that can handle any file type? Any help would be great. I'm rather stuck and floundering here. Thanks, Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Randall http://www.xaren.net AIM: blitz574 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email w/ attachments
Bastien Koert wrote: Use PHPMailer or one of the other classes available...makes life so much easier eric cartman Kick Ass!!! /eric cartman Yes! Wow! Was that a breeze! That class rocks! Thanks tons, Bastien! I have to admit when I first saw your reply I thought, Oh, man, another class to learn? But I know this is so close to working. I look at the sample and thought, This looks easy, and had it working in no time. Big thanks again! Attachments were a big deal here and this makes it a breeze, AND it looks like multiple attachments would be no problem? Very cool! Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sending email when sendmail_from sendmail_path = null.
Hello, My client's web host's PHP configuration for both sendmail_from and sendmail_path are both = null. How do I send email with PHP? What options do I need to set within my code, and what to? Tim
Re: [PHP] Sending email when sendmail_from sendmail_path = null.
Tim Burgan wrote: My client's web host's PHP configuration for both sendmail_from and sendmail_path are both = null. How do I send email with PHP? What options do I need to set within my code, and what to? Not sure you can... You might try using .htaccess to set things like: php_value sendmail_path /usr/bin/sendmail -t -i It may be that your host doesn't WANT you sending PHP email... You then might be able to connect to another server with SMTP to send email. Another possibility is to use PHP's IMAP functions to create emails in your own Outbox, and then your regular mail usage to send them... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sending email
Hi all, I want to send a test message with the following specifications: 1. The message is sent by [EMAIL PROTECTED] 2. The message is sent to the following recipients: [EMAIL PROTECTED], [EMAIL PROTECTED] 3. The message has the subject: [EMAIL PROTECTED] 4. The message has the following header: From: Me[EMAIL PROTECTED] To: Multiple recipientsrecipients.info 5. The body of the message is: Test Can I use mail() function for this? Thank you. Teddy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email
Hi Octavian Rasnita, Yes You can use mail() function for this purpose. Just separate each reciepent address by a comma (,) . $to=[EMAIL PROTECTED],[EMAIL PROTECTED]; $header=from:Me [EMAIL PROTECTED] \r\n; $subject=[EMAIL PROTECTED]; $body=test; mail($to, $subject, $body, $header); Will do the needfull. zareef ahmed --- Octavian Rasnita [EMAIL PROTECTED] wrote: Hi all, I want to send a test message with the following specifications: 1. The message is sent by [EMAIL PROTECTED] 2. The message is sent to the following recipients: [EMAIL PROTECTED], [EMAIL PROTECTED] 3. The message has the subject: [EMAIL PROTECTED] 4. The message has the following header: From: Me[EMAIL PROTECTED] To: Multiple recipientsrecipients.info 5. The body of the message is: Test Can I use mail() function for this? Thank you. Teddy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email without an email server
Hi jason, I've added the SMTP to a smtp server, saved the .ini and restarted the server with no luck. It complains Warning: mail(): sendmail_from not set in php.ini or custom From: header missing in c:\program files\apache group\apache\htdocs\email.php on line 131 Line 131 is the end of the file (?) The mail command is mail(Webmail .$emailTo.,[Contact],$msg,From: Webmail [EMAIL PROTECTED] \nReply-To: .$name. .$emailFrom.\n); Any tips ? On Tue, 13 Jul 2004 19:20:25 +0800, Jason Wong [EMAIL PROTECTED] wrote: On Tuesday 13 July 2004 18:46, robert mena wrote: I have a small script hosted in a win32/apache/php4 enviroment where I do not have a local email server. I was wondering how could I send emails either connecting directly to the mx or sending through a relay. mail() on Windows system does (only) use SMTP. Just configure your php.ini correctly and it should work. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email without an email server
Set this in your php.ini: sendmail_from = [EMAIL PROTECTED] On Mon, 19 Jul 2004 14:17:17 -0400, robert mena [EMAIL PROTECTED] wrote: Hi jason, I've added the SMTP to a smtp server, saved the .ini and restarted the server with no luck. It complains Warning: mail(): sendmail_from not set in php.ini or custom From: header missing in c:\program files\apache group\apache\htdocs\email.php on line 131 Line 131 is the end of the file (?) The mail command is mail(Webmail .$emailTo.,[Contact],$msg,From: Webmail [EMAIL PROTECTED] \nReply-To: .$name. .$emailFrom.\n); Any tips ? On Tue, 13 Jul 2004 19:20:25 +0800, Jason Wong [EMAIL PROTECTED] wrote: On Tuesday 13 July 2004 18:46, robert mena wrote: I have a small script hosted in a win32/apache/php4 enviroment where I do not have a local email server. I was wondering how could I send emails either connecting directly to the mx or sending through a relay. mail() on Windows system does (only) use SMTP. Just configure your php.ini correctly and it should work. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php !DSPAM:40fc1472196622019318716! -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sending email without an email server
Hi, I have a small script hosted in a win32/apache/php4 enviroment where I do not have a local email server. I was wondering how could I send emails either connecting directly to the mx or sending through a relay. regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email without an email server
On Tuesday 13 July 2004 18:46, robert mena wrote: I have a small script hosted in a win32/apache/php4 enviroment where I do not have a local email server. I was wondering how could I send emails either connecting directly to the mx or sending through a relay. mail() on Windows system does (only) use SMTP. Just configure your php.ini correctly and it should work. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Give me enough medals, and I'll win any war. -- Napoleon */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email without an email server
You may also wish to look at PEAR::Mail ( http://pear.php.net/package/Mail ). It provides an SMTP interface to sending mail. Jason Wong wrote: On Tuesday 13 July 2004 18:46, robert mena wrote: I have a small script hosted in a win32/apache/php4 enviroment where I do not have a local email server. I was wondering how could I send emails either connecting directly to the mx or sending through a relay. mail() on Windows system does (only) use SMTP. Just configure your php.ini correctly and it should work. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sending email with php
Hi, How can i send email in php usig the smtp server? I'm looking for a tutorial or a good script. Thanks
Re: [PHP] Sending email with php
At 12:43 16-6-04, you wrote: Hi, How can i send email in php usig the smtp server? I'm looking for a tutorial or a good script. for what it's worth, i use the class from phpguru.org and try a google on [helo smtp php mail], loads of hits -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email with the windows version of php
hello, My client is wanting to transfer their web site from a system that uses: freebsd, apache, mysql and php, to a windows based hosting service. Did you tell them this is a bad idea. :) So I was wondering if the Windows version of PHP sends e-mail with the same commands as Sendmail or do I have to re-write the scripts. Or can you tell me what form of email sending windows would use. if you use the php mail command, you shouldn't have any problems. In the unix version the mail command uses sendmail where the windows version connects to a smtp server and sends the message its self. You would need to set 'SMTP' and 'sendmail_from' in your php.ini. The 'sendmail_path' doesn't work for Windows, so you can leave that blank. Nothing else changes then... -- [Win2000 | Apache/1.3.23] [PHP/4.2.3 | MySQL/3.23.53] Ivo Fokkema PHP MySQL programmer Leiden University Medical Centre Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sending email with the windows version of php
hello, My client is wanting to transfer their web site from a system that uses: freebsd, apache, mysql and php, to a windows based hosting service. So I was wondering if the Windows version of PHP sends e-mail with the same commands as Sendmail or do I have to re-write the scripts. Or can you tell me what form of email sending windows would use. Thanks, Ivan
Re: [PHP] Sending email with the windows version of php
Ivan Carey [EMAIL PROTECTED] wrote: hello, My client is wanting to transfer their web site from a system that uses: freebsd, apache, mysql and php, to a windows based hosting service. Did you tell them this is a bad idea. So I was wondering if the Windows version of PHP sends e-mail with the same commands as Sendmail or do I have to re-write the scripts. Or can you tell me what form of email sending windows would use. if you use the php mail command, you shouldn't have any problems. In the unix version the mail command uses sendmail where the windows version connects to a smtp server and sends the message its self. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sending email
hi i want to send html format type of emails using mail( ); function? is there a how to where can i start learning that type of encoding thanks
Re: [PHP] sending email
add this in the header section Content-Type: text/html; charset=\iso-8859-1 also for html body use this $message = chunk_split(base64_encode($message)); hi i want to send html format type of emails using mail( ); function? is there a how to where can i start learning that type of encoding thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sending email
HTML E-mail is just HTML code embedded in the e-mail. Pick up a book on HTML code. Even easier, make a web page using your favorite editor (note ms word and open office allow you to save as web page) and cut and paste the code. I think there /might/ be an extra line or two you might have to add to the mail header. Perhaps googling would help. -Dan On Wed, 2003-05-28 at 23:32, Aris Santillan wrote: hi i want to send html format type of emails using mail( ); function? is there a how to where can i start learning that type of encoding thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sending email with linefeeds
Hi, we are sending plain-text-emails from php not using the mail-command but with port-operations. Everything works fine BUT outlook 2000 eats the linefeeds. We tried several things: copying the header from an original (functional) email from outlook, sending with \n or \r\n to seperate header-info and so on... nothing works. All email-clients show the mails correct - outlook 2000 doesn't. Since other mails are shown correct, there MUST be a way, but we don't know, which. Who can help? Thanx Kai -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sending email to a mailing list
I do not agree. First off all (in my case) I do want to send personalized e-mails. And even if I cancel this wish.. how about adresses which fail? You will never ever find out how many adresses failed by putting them into the all in bcc. And.. isn't there a restriction? What happens if you put 1 adresses into the header? I am pretty sure this will fail. I guess the only really good solution is to let the MTA do the job for ya. I just do not know how, but I am positive that this is the best solution (since the MTA is made for such things while php is not) Andy Justin French [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 28/08/02 1:38 AM, Raphael Hamzagic ([EMAIL PROTECTED]) wrote: I'm with a little doubt about the best way to send a mail message to a large mailing list using PHP. I'm not interested in existing mailing list managers, or source codes. I dont know if the best way to send emails is to use a repeat loop with mail() function, or use some other structure to send emails with timeouts intervals... yes, and yes, providing you want to send personalised emails, which costs huge performance problems and a lkoad on the server... possibly leads to timeouts of the script, timeouts of the browser, etc etc. Not good! the real easy solution is to send ONE email with everyone in the Bcc field. Quick and simple. Won't piss off your host, won't load the server, etc. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sending email to a mailing list
Hello, On 08/28/2002 07:54 PM, Andy wrote: I do not agree. First off all (in my case) I do want to send personalized e-mails. And even if I cancel this wish.. how about adresses which fail? You will never ever find out how many adresses failed by putting them into the all in bcc. And.. isn't there a restriction? What happens if you put 1 adresses into the header? I am pretty sure this will fail. I guess the only really good solution is to let the MTA do the job for ya. I just do not know how, but I am positive that this is the best solution (since the MTA is made for such things while php is not) This is not true. You need to stude your solutions better. If you set the return-path address right, you will collect bouncing messages and can process them the way you think it is right. That is what mailing list managers do. Go and see any mailing list and notice that users do not get personalized messages. It is all automatic. You do not need an existing mailing list manager to do that. I can provide you a real life testemony as developer of the PHP Classes site. Every day, the site sends out tens of thousands of messages in form of alerts and newsletters. None is personalized. It would hog the server if I used personalization. I put all recipients in Bcc. I have my tricks though. For instance, I use qmail with VERP (Variable Envelop Return-Path) to improve accuracy in the detection of which addresses are bouncing. Anyway, all is done via this simple class that is meant for composing and sendind MIME formatted messages and has a subclass to send via qmail-inject that injects a single message in the local queue to over 50.000 recipients in less than 3 seconds. http://www.phpclasses.org/mimemessage Manuel Lemos Justin French [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 28/08/02 1:38 AM, Raphael Hamzagic ([EMAIL PROTECTED]) wrote: I'm with a little doubt about the best way to send a mail message to a large mailing list using PHP. I'm not interested in existing mailing list managers, or source codes. I dont know if the best way to send emails is to use a repeat loop with mail() function, or use some other structure to send emails with timeouts intervals... yes, and yes, providing you want to send personalised emails, which costs huge performance problems and a lkoad on the server... possibly leads to timeouts of the script, timeouts of the browser, etc etc. Not good! the real easy solution is to send ONE email with everyone in the Bcc field. Quick and simple. Won't piss off your host, won't load the server, etc. Justin -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sending email to a mailing list
on 29/08/02 8:54 AM, Andy ([EMAIL PROTECTED]) wrote: I do not agree. First off all (in my case) I do want to send personalized e-mails. And even if I cancel this wish.. how about adresses which fail? You will never ever find out how many adresses failed by putting them into the all in bcc. And.. isn't there a restriction? What happens if you put 1 adresses into the header? I am pretty sure this will fail. I know of site sending with a lot more than that, although the you talk about restrictions may be imposed by the host... and their host may be less restrictive. I guess the only really good solution is to let the MTA do the job for ya. I just do not know how, but I am positive that this is the best solution (since the MTA is made for such things while php is not) It'll make your host happy too. It *can* be done with PHP, it's just that every solution is a real messy job -- nothing is simple. FWIW, I wish to send personalised emails too, but at the moment can't see the light. Justin French Andy Justin French [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 28/08/02 1:38 AM, Raphael Hamzagic ([EMAIL PROTECTED]) wrote: I'm with a little doubt about the best way to send a mail message to a large mailing list using PHP. I'm not interested in existing mailing list managers, or source codes. I dont know if the best way to send emails is to use a repeat loop with mail() function, or use some other structure to send emails with timeouts intervals... yes, and yes, providing you want to send personalised emails, which costs huge performance problems and a lkoad on the server... possibly leads to timeouts of the script, timeouts of the browser, etc etc. Not good! the real easy solution is to send ONE email with everyone in the Bcc field. Quick and simple. Won't piss off your host, won't load the server, etc. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sending email to a mailing list
Hi everyone, I'm with a little doubt about the best way to send a mail message to a large mailing list using PHP. I'm not interested in existing mailing list managers, or source codes. I dont know if the best way to send emails is to use a repeat loop with mail() function, or use some other structure to send emails with timeouts intervals... Thanks in advance Hamzagic -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sending email to a mailing list
on 28/08/02 1:38 AM, Raphael Hamzagic ([EMAIL PROTECTED]) wrote: I'm with a little doubt about the best way to send a mail message to a large mailing list using PHP. I'm not interested in existing mailing list managers, or source codes. I dont know if the best way to send emails is to use a repeat loop with mail() function, or use some other structure to send emails with timeouts intervals... yes, and yes, providing you want to send personalised emails, which costs huge performance problems and a lkoad on the server... possibly leads to timeouts of the script, timeouts of the browser, etc etc. Not good! the real easy solution is to send ONE email with everyone in the Bcc field. Quick and simple. Won't piss off your host, won't load the server, etc. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sending Email
is imap_mail() currently available in Win32?? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending email to php script
On Fri, 2 Nov 2001 18:33, Adrian D'Costa wrote: On Fri, 2 Nov 2001, David Robley wrote: What if we need both version?? There's nothing stopping you running both. How do you compile it for both? Adrian To do the cgi compile, use all the configure values you need EXCEPT anything apache related. The compile will produce an executable called, strangely, php. Will it work with apache then? Adrian Um, I don't understand? Presumably you already have the module version of PHP running with Apache; all you need the standalone for is to non-web based stuff? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Catalogue: How to tell one sort of cat from another. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending email to php script
I think someone electrified the corridor, Tom said haltingly. ^^ shouldnt that be shockingly? :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending email to php script
On Fri, 2 Nov 2001, David Robley wrote: What if we need both version?? There's nothing stopping you running both. How do you compile it for both? Adrian To do the cgi compile, use all the configure values you need EXCEPT anything apache related. The compile will produce an executable called, strangely, php. Will it work with apache then? Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] sending email to php script
On Thu, 1 Nov 2001, Jason Murray wrote: You'll also need to compile php as a standalone, and put as the first line of your php script #!/path/to/php -q What if we need both version?? There's nothing stopping you running both. How do you compile it for both? Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending email to php script
On Fri, 2 Nov 2001 15:09, Adrian D'Costa wrote: On Thu, 1 Nov 2001, Jason Murray wrote: You'll also need to compile php as a standalone, and put as the first line of your php script #!/path/to/php -q What if we need both version?? There's nothing stopping you running both. How do you compile it for both? Adrian To do the cgi compile, use all the configure values you need EXCEPT anything apache related. The compile will produce an executable called, strangely, php. I think there are a few lines in the docs about it somewhere in the compile section. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I think someone electrified the corridor, Tom said haltingly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending email to php script
On Mon, 29 Oct 2001, David Robley wrote: On Sat, 27 Oct 2001 03:23, JSheble wrote: A while ago an email came through here about how to parse out email message from a php script. The thing that was mostly of interest to me is the ability to send an email to a php script, I guess through a sendmail alias? I asked how to accomplish this, and never saw an answer come through. So I'd like to ask again :o) Does anybody know what would be required or necessary to send an email to an address that would run a php script? You say sendmail, so do it thusly: Edit /etc/aliases and add a line like phpmail: | /pathto/your/php/script and run newaliases to update your alias database. Actually, I am still trying to figure this out when I get time. What I did was: phpmail: | lynx -dump /pathto/your/php/script But the problem is nothing appears to be capture in the script. Or rather in what format does this mail arrive. I even tried to write it to a file but nothing is written. You'll also need to compile php as a standalone, and put as the first line of your php script #!/path/to/php -q What if we need both version?? Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] sending email to php script
You'll also need to compile php as a standalone, and put as the first line of your php script #!/path/to/php -q What if we need both version?? There's nothing stopping you running both. J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending email to php script
On Wed, 31 Oct 2001 22:04, Adrian D'Costa wrote: On Mon, 29 Oct 2001, David Robley wrote: On Sat, 27 Oct 2001 03:23, JSheble wrote: A while ago an email came through here about how to parse out email message from a php script. The thing that was mostly of interest to me is the ability to send an email to a php script, I guess through a sendmail alias? I asked how to accomplish this, and never saw an answer come through. So I'd like to ask again :o) Does anybody know what would be required or necessary to send an email to an address that would run a php script? You say sendmail, so do it thusly: Edit /etc/aliases and add a line like phpmail: | /pathto/your/php/script and run newaliases to update your alias database. Actually, I am still trying to figure this out when I get time. What I did was: phpmail: | lynx -dump /pathto/your/php/script But the problem is nothing appears to be capture in the script. Or rather in what format does this mail arrive. I even tried to write it to a file but nothing is written. The pipe feeds the incoming data to the script as standard input - $DEITY knows what lynx would do with that, but black holes seem to be the most likely destination. Your script needs to be an executable, standalone which reads and parses data from stdin and which is the direct recipient of info from the pipe. You'll also need to compile php as a standalone, and put as the first line of your php script #!/path/to/php -q What if we need both version?? As my colleague on the eastern seaboard has noted already, you can have a module and a standalone on the same system. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Catscan: searching for kitty. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending email to php script
On Sat, 27 Oct 2001 03:23, JSheble wrote: A while ago an email came through here about how to parse out email message from a php script. The thing that was mostly of interest to me is the ability to send an email to a php script, I guess through a sendmail alias? I asked how to accomplish this, and never saw an answer come through. So I'd like to ask again :o) Does anybody know what would be required or necessary to send an email to an address that would run a php script? You say sendmail, so do it thusly: Edit /etc/aliases and add a line like phpmail: | /pathto/your/php/script and run newaliases to update your alias database. You'll also need to compile php as a standalone, and put as the first line of your php script #!/path/to/php -q Cheers -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA He's dead, Jim. Get his ears! - Spock -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sending email to php script
A while ago an email came through here about how to parse out email message from a php script. The thing that was mostly of interest to me is the ability to send an email to a php script, I guess through a sendmail alias? I asked how to accomplish this, and never saw an answer come through. So I'd like to ask again :o) Does anybody know what would be required or necessary to send an email to an address that would run a php script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Sending Email via PHP on Win2K
Hi Has anyone done this? Does PHP interact with the SMTP service on the machine? Does anyone have a script that does this? thanks Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Sending Email via PHP on Win2K
Check out the mail() function in the php manual. There is literally tons of info on this function. - Original Message - From: "Boaz Yahav" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 17, 2001 4:54 PM Subject: [PHP] Sending Email via PHP on Win2K Hi Has anyone done this? Does PHP interact with the SMTP service on the machine? Does anyone have a script that does this? thanks Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP sending email contents as an attachment, not in thebody
"Lindsay Adams" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... According to the headers in your email, you are using Outlook Express. I think it is a microsoft issue. Because when I write a long email in OE, and send it to myself, I get it as an attachment. If I write it in Eudora, and pick up my mail with Eudora, it comes as one message, no attachment, but if I check mail in OE, it suddenly adds the message as an attachment. So, I don't think you can get around this with PHP functions, because I doubt the issue lies there. On 4/3/01 3:50 AM, "Tom Pinder" [EMAIL PROTECTED] wrote: I'm using PHP to send emails. The problem I have is that when the emails reach a certain length, the emails are sent with the email contents as an attachment, not as part of the body. I've looked thru all the mailing lists, but I can't find a reference to a similar problem. Has anyone come across this before? Is there is any way to control this behaviour? Is there a way of forcing mail() or imap_mail() to include the contents in the email body? imap_mail ($testAddress, $title, $emailContents, "from:[EMAIL PROTECTED]"); mail ($testAddress, $title, $emailContents, "from:[EMAIL PROTECTED]"); The issue probably lies (as Lindsay said) in Outlook express, more accurately in the memo box type that is being used. Microsoft has a terrible habbit of (in their 'free' stuff atleast) using the Memo box (which has a limit of 32kb) for quick-view types of things. Anything over that and you'd see what you are. bkx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP sending email contents as an attachment, not in the body
I'm using PHP to send emails. The problem I have is that when the emails reach a certain length, the emails are sent with the email contents as an attachment, not as part of the body. I've looked thru all the mailing lists, but I can't find a reference to a similar problem. Has anyone come across this before? Is there is any way to control this behaviour? Is there a way of forcing mail() or imap_mail() to include the contents in the email body? imap_mail ($testAddress, $title, $emailContents, "from:[EMAIL PROTECTED]"); mail ($testAddress, $title, $emailContents, "from:[EMAIL PROTECTED]"); Many thanks, Tom Pinder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sending email problems
Could some one please take a look at this and offer any suggestions as to why i can't 1 send multiple "to" emails and also why i can't send to the addesses in the "CC" part (i can't send to either single or multiple in CC) This has got me baffled as to why i can't... Thanks in advance Peter ? session_start(); if ($REQUEST_METHOD=='POST') { header('Expires: ' . gmdate("D, d M Y H:i:s", time()+1000) . ' GMT'); header('Cache-Control: Private'); } session_register('user'); session_register('pass'); session_register('email'); session_register('company'); session_register('real_name'); $session = session_id(); $userid = '$user'; /* recipients */ $address .= $email ; $date = date("D M d, Y "); // Subject $subject = "abc Calculation Results"; //Body of email $body = "Thank you $real_name ,\n Company whom you are from:\t $company\n Date of enquiry on \t $date\n Your Customer type is:\t $custtype\n Your Reference is:\t $ref\n Your Quote was for: \t $equcost\n Your Rental Monthly Figures are as follows:\n \n 24 Months = $ $m2 \n 36 Months = $ $m3 \n 48 Months = $ $m4 \n Your Quartly Figures are: \n \n 24 Months = $ $q2 \n 36 Months = $ $q3 \n 48 Months = $ $q4 \n \n\n\n\n Thank you again."; //Where the email is from $headers .= "From: abc [EMAIL PROTECTED]\n"; $headers .= "X-Sender: [EMAIL PROTECTED]\n"; $headers .= "X-Mailer: PHP\n"; // mailer $headers .= "X-Priority: 1\n"; // Urgent message! $headers .= "Return-Path: [EMAIL PROTECTED]\n"; // Return path for errors /* If you want to send html mail, uncomment the following line */ //$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type $headers .= "cc:[EMAIL PROTECTED],[EMAIL PROTECTED]\n"; // CC to //send the email $mailsend = mail("$address", "$subject", "$body.", "$headers \nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" ); print ("$mailsend"); echo "font face=Helvetica, sans-serif size=3 color=#00499CEmail Sent!/font"; include "incend.s"; ?
RE: [PHP] sending email problems
The email address for the "To" part is taken from values saved within the session and that works fine .. just when i try to send to more than one email alais that it doesn't do.. -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Monday, February 19, 2001 11:59 AM To: "Peter Houchin" Subject: Re: [PHP] sending email problems Could some one please take a look at this and offer any suggestions as to why i can't 1 send multiple "to" emails and also why i can't send to the addesses in the "CC" part (i can't send to either single or multiple in CC) This has got me baffled as to why i can't... Thanks in advance I'm still beginning with PHP / Perl, big time, but shouldn't you have a While loop wrapped around the mail(); (if selecting recipients from a database)? $sql = "SELECT email_address FROM users"; $result = @mysql_query($sql, $connection) or die ("Time for bed."); while($row = mysql_fetch_array($result)) { $address = $row['address']; mail("$address", "$subject", "$body.", "$headers \nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" ); } I see from your email address you're in Oz. I am in the UK. And should be in bed... Work tomorrow. :) James. $mailsend = mail("$address", "$subject", "$body.", "$headers \nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" ); print ("$mailsend"); echo "font face=Helvetica, sans-serif size=3 color=#00499CEmail Sent!/font"; include "incend.s"; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]