Re: [PHP-DB] Mail Function
Mark Bomgardner wrote: I have been racking my brain for the better part of a day with a simple mail function. I am trying to generate a list of events from MySQL and then use the php Mail function to email the list in an html email to a mailing list. I keep getting a parse error on a section that I can not figure out why. ok, this is a general PHP question not realy a php-db type but 'sall good ;) a) the parse error is likely form a rogue quote (in the html perhaps) making a syntax error, hard to say with out the actual error b) are you sure mail() can tell that that is html and create the appropriate multi part MIME message? Highly doubtful since all mail() does is pipe the data to sendmail, I'd recommend using a valid MIME/SMTP tool like Perl's Mail::Sender::Easy module (http://search.cpan.org/perldoc?Mail::Sender::Easy) You can easily use Perl's DBI to do your MySQL query so there really is no need to try to hack up PHP's lame mail() function to do something it simply can't. HTH -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Mail Function
You can have 'blah'.} else { .'blah' because that is what you currently have.
Re: [PHP-DB] Mail Function
opps sorry for the typos you cant have
Re: [PHP-DB] Mail Function
From: Graeme McLaren [EMAIL PROTECTED] Evening all, I've written a script which sends emails, there is no problem with that. I was wondering how I can check for email bounces, anyone know how to do that? There's no direct, easy way. You'll have to write/aquire a PHP script that logs into a mail server and checks your mail for bounces and reacts accordingly. PHP offers the function to log into mail servers. Check the manual. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Mail Function
Your script actually connects to an SMTP server and sends the email? If this is the case, you can have your script look for success/error messages returned by the server when it sends - unless you're delivering to an AOL address. AOL accepts everything you throw at it and then sends back a notification of success/failure via email...sometimes. There are a few other servers that act the same way, but AOL is the biggest culprit in making an email list manager's life a living hell. I've actually been kicking around the idea of a PHP-based list manager that will also go through bounce notifications but haven't done anything more than that. The biggest hurdle is getting through the bounced messages. --JMR Graeme McLaren wrote: Evening all, I've written a script which sends emails, there is no problem with that. I was wondering how I can check for email bounces, anyone know how to do that? Cheers, G :) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail function
The textarea tag has an option called wrap, pls read below (extracted from w3c.org) TEXTAREA NAME=foo ROWS=4 COLS=40 WRAP=OFF Carriage returns and line feeds entered by the user are ignored and one line of text is sent to the server. No automatic wrapping is done, so the user must scroll horizontally to see lines that extend past the specified column width. TEXTAREA NAME=foo ROWS=4 COLS=40 WRAP=VIRTUAL Carriage returns and line feeds entered by the user are mirrored on the screen, but only one line of text is sent to the server with the return characters stripped out. Automatic wrapping as the user enters text is performed. TEXTAREA NAME=foo ROWS=4 COLS=40 WRAP=PHYSICAL Carriage returns and line feeds entered by the user are mirrored on the screen, and all characters the user enters are sent to the server. In addition, automatic word wrapping is performed and CR/LFs are sent where the user agent wraps the text. Ng Hwee Hwee wrote: hi all, i need to use a mail() function to send a job application to my inbox when an applicant goes online and complete the application form. However, when the contents of a certain field is very long, the message i get in my inbox is truncated! can anyone help me please? i've tried word wrap, chunk_split and chop but none worked.. the field in the form is something like textarea name=experience cols=50 rows=8/textarea. thank you in advance for your help! kind regards, hwee hwee -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail() function
Yehp, actually there is :-) On windows machines you'll need to change the SMTP in there (Since you probably aren't running a local mail server), in your php.ini you can most likely change it to your ISP's mail server., there is more specific info on the docs for the mail funcion in the php manual -- refer to the user postings: http://us4.php.net/manual/en/ref.mail.php -Mike - Original Message - From: Alex Francis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 3:41 PM Subject: [PHP-DB] mail() function I have set up my pc as a test server Windows 98 running Apache as a service, PHP and MySQL but cannot get the mail() function to work. After a long wait, I get an error Warning: Failed to Receive in c:\phpdev\www\assets\submit_users.php on line 17. Is there something I should be changing in the PHP.ini. I used the default settings for this. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail() function
Is the the type of thing I would need? http://www.postcastserver.com/ I found where I am supposed to alter the PHP.ini file. What am I supposed to type instead of 'localhost' Rick Don't burn the day...away ~ DJM From: Jason Wong [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] mail() function Date: Sat, 22 Mar 2003 14:49:29 +0800 On Saturday 22 March 2003 16:53, Rick Dahl wrote: I think the fact that I don't have a mailserver would do it. Unless the PHP home edition 2 bundle has a mailserver, I don't have one. Where can I get one of those? Can I get it for free? I think having a mailserver would be a tremendous help in sending mail :) If you're running on some Windows system you can try specifying the SMTP server provided by your ISP. Otherwise google is your friend. If you're running some *nix system then they usually come with the ubiquitous sendmail. -- 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-db -- /* Let me put it this way: today is going to be a learning experience. */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail() function
On Tuesday 25 March 2003 04:39, Rick Dahl wrote: Is the the type of thing I would need? http://www.postcastserver.com/ I found where I am supposed to alter the PHP.ini file. What am I supposed to type instead of 'localhost' If you're running an SMTP server on the same machine (as your webserver) then leave it as 'localhost'. Otherwise do what I originally suggested and use an upstream SMTP server (probably provided by your ISP). -- 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-db -- /* Hoare's Law of Large Problems: Inside every large problem is a small problem struggling to get out. */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail() function
On Saturday 22 March 2003 16:38, Rick Dahl wrote: I can't get it to work. I get the echo to show up but never receive a email. if($blankpostage) { $to = Rick Dahl [EMAIL PROTECTED]; $subject = Online B+P Request; $body = Show ID = . $id; mail($to, $subject, $body); echo sadflkjaflkasdj; } 1) Check that php.ini is correctly configured 2) Check the php error log 3) Check your mailserver log -- 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-db -- /* You can learn many things from children. How much patience you have, for instance. -- Franklin P. Jones */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail() function
I think the fact that I don't have a mailserver would do it. Unless the PHP home edition 2 bundle has a mailserver, I don't have one. Where can I get one of those? Can I get it for free? Rick - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 21, 2003 10:41 PM Subject: Re: [PHP-DB] mail() function On Saturday 22 March 2003 16:38, Rick Dahl wrote: I can't get it to work. I get the echo to show up but never receive a email. if($blankpostage) { $to = Rick Dahl [EMAIL PROTECTED]; $subject = Online B+P Request; $body = Show ID = . $id; mail($to, $subject, $body); echo sadflkjaflkasdj; } 1) Check that php.ini is correctly configured 2) Check the php error log 3) Check your mailserver log -- 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-db -- /* You can learn many things from children. How much patience you have, for instance. -- Franklin P. Jones */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail() function
On Saturday 22 March 2003 16:53, Rick Dahl wrote: I think the fact that I don't have a mailserver would do it. Unless the PHP home edition 2 bundle has a mailserver, I don't have one. Where can I get one of those? Can I get it for free? I think having a mailserver would be a tremendous help in sending mail :) If you're running on some Windows system you can try specifying the SMTP server provided by your ISP. Otherwise google is your friend. If you're running some *nix system then they usually come with the ubiquitous sendmail. -- 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-db -- /* Let me put it this way: today is going to be a learning experience. */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Mail Function
Hi Manoj Japher, add the following (see in context) ? $toaddress = [EMAIL PROTECTED]; ^ addslashes(...) $fromaddress = [EMAIL PROTECTED]; ^ addslashes(...) $subject = Test Mail; ^ addslashes(...) $content = Your username and password as you requested \n ^ addslashes(...) .Username = user \n .Password = pass \n; mail($toaddress, $subject ,$content, $fromaddress); echo Your username and password has been mailed to you ; ? The returned mail can be a result of the missing part(s). Regards, Ruprecht -- Ruprecht Helms - IT-Service Softwareentwicklung == E-Mail: Ruprecht Helms [EMAIL PROTECTED] Date: 27-Aug-02 Time: 22:16:46 == Homepage: http://www.rheyn.de email: [EMAIL PROTECTED] Phone + Fax +49[0]7621 16 99 16 This message was sent by XFMail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Mail Function
$mailTo = [EMAIL PROTECTED]; $mailFrom = From:[EMAIL PROTECTED]; $mailSubject = This is an email...; $mailBody = This is a message; @mail($mailTo,$mailFrom,$mailSubject,$mailBody); Try this, it works for me ;-) Russ -Original Message- From: Manoj Japher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Mail Function hi, I know this question is in the wrong group, but I hope someone maybe able to help me out. I need to use the mail() function in my code to send out mails which I am able to do successfully. But I am not able to set the 'from address' in the mail I sent. It always varies. Can I set the from address field as to my liking. I tried the following code ? $toaddress = [EMAIL PROTECTED]; $fromaddress = [EMAIL PROTECTED]; $subject = Test Mail; $content = Your username and password as you requested \n .Username = user \n .Password = pass \n; mail($toaddress, $subject ,$content, $fromaddress); echo Your username and password has been mailed to you ; ? And the mail I got had the from address as [EMAIL PROTECTED] Can someone help me out please Best Regards, Manoj 'I have miles to go before I sleep, and promises to keep' -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Mail Function
Oops! wrong order of arguments... I meant: $mailTo = [EMAIL PROTECTED]; $mailFrom = From:[EMAIL PROTECTED]; $mailSubject = This is an email...; $mailBody = This is a message; @mail($mailTo,$mailSubject,$mailBody,$mailFrom); Russ -Original Message- From: Manoj Japher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Mail Function hi, I know this question is in the wrong group, but I hope someone maybe able to help me out. I need to use the mail() function in my code to send out mails which I am able to do successfully. But I am not able to set the 'from address' in the mail I sent. It always varies. Can I set the from address field as to my liking. I tried the following code ? $toaddress = [EMAIL PROTECTED]; $fromaddress = [EMAIL PROTECTED]; $subject = Test Mail; $content = Your username and password as you requested \n .Username = user \n .Password = pass \n; mail($toaddress, $subject ,$content, $fromaddress); echo Your username and password has been mailed to you ; ? And the mail I got had the from address as [EMAIL PROTECTED] Can someone help me out please Best Regards, Manoj 'I have miles to go before I sleep, and promises to keep' -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail function
Nice, mature response, Jason. Really smooth! :o) :chortle: Martin [EMAIL PROTECTED] 06/30/02 09:44AM On Sunday 30 June 2002 09:06, CrossWalkCentral wrote: As this has nothing to do with DBs it should be posted to the php-general list. When using this fucntion listed bellow with the HTML headder What function? And what HTML header? the email sent does not show the FROM in the FORM filed it just displays it in the email message FORM filed -- is this FROM field or FORM filled (or do you really mean FORM filed?) Any one have any ideas. From this confusing mish-mash, I can only guess that you're trying to use the mail() function and you're trying to add a FROM header. $headers .= From: CrossWalkCentral [EMAIL PROTECTED] \n; That being the case the manual has an example on how it is done. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* No good deed goes unpunished. -- Clare Booth Luce */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail function
On Sunday 30 June 2002 09:06, CrossWalkCentral wrote: As this has nothing to do with DBs it should be posted to the php-general list. When using this fucntion listed bellow with the HTML headder What function? And what HTML header? the email sent does not show the FROM in the FORM filed it just displays it in the email message FORM filed -- is this FROM field or FORM filled (or do you really mean FORM filed?) Any one have any ideas. From this confusing mish-mash, I can only guess that you're trying to use the mail() function and you're trying to add a FROM header. $headers .= From: CrossWalkCentral [EMAIL PROTECTED] \n; That being the case the manual has an example on how it is done. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* No good deed goes unpunished. -- Clare Booth Luce */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail() function
If you are on Windows you can just point to your ISP's SMTP server in your .ini file. At 11:02 AM 6/10/02 +0200, Dib, Walid (MED, Stagiaire GEMS) wrote: Hello I want to test the mail() function locally, i'm using esays php, how can I do that? thanks Walid -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mail() function
On 6/10/02 5:02 AM, Dib, Walid (MED, Stagiaire GEMS) [EMAIL PROTECTED] pressed the keys forming the message: Hello I want to test the mail() function locally, i'm using esays php, how can I do that? Not sure what esays php is, but you don't say what platform you're on. Basically, you need some kind of mail server. If you're on Linux or MacOS X, great: you've got sendmail built in. If you're on Windows, you either need an SMTP product running locally, or you need one you can connect to. -- Ed Marczak [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] mail function
check that you have either specified [mail function] ; For Win32 only. SMTP = mail.myserver.com ; For Win32 only. sendmail_from = [EMAIL PROTECTED] or the sendmail path here; ; For Unix only. You may supply arguments as well (default: 'sendmail -t -i'). ;sendmail_path = /usr/bin/sendmail otherwise mail cannot send mail at all. -Original Message- From: Travis Cannell [mailto:[EMAIL PROTECTED]] Sent: 14 August 2001 03:27 To: [EMAIL PROTECTED] Subject: [PHP-DB] mail function hi all, I cant seem to get my mail function to work. OK so i am a noob, that might have something to do with it. I am using a script I found called the HTML Mime Mail Class, which does everything i need except actually send the mail. I am guessing that there is some config problems, but i am not sure. Even when i try and use the mail() function i get a server error. So i guess that my problem is that my return address is messed up. Does it have to be my own domain, or the domain that the server is running on? Can i set the return address as a hotmail account, or do i need my own server mail program? And is there anything that i need to config in the php.ini file? Thanks for helping, T P K Cannell -- PHP Database 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 Database 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]