What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Help with PHP mail

Help with PHP mail
Author: Message:
leito
Senior Member
****

Avatar
Chameleon by KeyStorm

Posts: 720
Reputation: 5
38 / Male / –
Joined: Apr 2003
O.P. Help with PHP mail
I'm using this code, I just change the Headers, and stop working. Can someone help me figuring out what happen?, thank you very much.

    mail($email_address, $subject, $message,
        "From: Leonel Galán<leonelgalan@mysite.com>\r\n"
    ."Reply-To: leonelgalan@anothersite.com\r\n"
    ."X-Mailer: PHP/" . phpversion());

I add the headers, because my mail was treated as SPAM by some mailfilters, so I thought headers could help.
[Image: leonelgalan.png]
06-18-2004 05:18 AM
Profile E-Mail PM Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: Help with PHP mail
It looks ok, but I think you should'nt avoid the Mime-Type header. Anyway, why don't you define the headers like in
code:

/* Para enviar correo HTML, puede definir la cabecera Content-type. */
$cabeceras  = "MIME-Version: 1.0\r\n";
$cabeceras .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* cabeceras adicionales */
$cabeceras .= "To: Maria <maria@example.com>, Kelly <kelly@example.com>\r\n";
$cabeceras .= "From: Recordatorio <cumpleanyos@example.com>\r\n";
$cabeceras .= "Cc: archivo@example.com\r\n";
$cabeceras .= "Bcc: chequeo@example.com\r\n";


Taken from the spanish PHP-doc
06-18-2004 06:40 AM
Profile E-Mail PM Web Find Quote Report
leito
Senior Member
****

Avatar
Chameleon by KeyStorm

Posts: 720
Reputation: 5
38 / Male / –
Joined: Apr 2003
O.P. RE: Help with PHP mail
But the Message isn't HTML, and.... can TO be a header (cabecera)??  I'll try that, hope the SPAM Filters dont mess with my emails.
[Image: leonelgalan.png]
06-18-2004 05:03 PM
Profile E-Mail PM Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: Help with PHP mail
I'm afraid that if you define X-Mailer: PHP/" . phpversion()) it won't help your mails to pass the spamfilter, since this means the email was sent automatically.

You have to change the mime-type, obviously. :google: it and choose the one that fits your needs ;)
06-19-2004 12:34 PM
Profile E-Mail PM Web Find Quote Report
Chris.1
Full Member
***

Avatar
addicted to the net

Posts: 363
Reputation: 3
36 / Male / –
Joined: Jun 2003
RE: Help with PHP mail
code:
// Headers so we can have HTML encoded emails
$headers = "From: $fromName <$email>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html";
       
// Check to see if the mail was sent
if(mail($to,"Email Form",$message,$headers)) {


The above is taken from my mail script. $to comtains the email address, $Message contains the actual message and the headers part is pretty self explanitory.

Hope that helps

This post was edited on 06-19-2004 at 10:30 PM by Chris.1.
06-19-2004 10:30 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On