Click to See Complete Forum and Search --> : sending mail


katasova
02-23-2006, 11:56 AM
Hello, i have this little problem and i dont know if it is my fault or is something of my SMTP server...

I have this headers to send an email:



$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: <$from>\r\n";
$headers .= "Return-Path: katasova@gmail.com\r\n";
$headers .= "Reply-To: katasova@gmail.com\r\n";



When i send the mail:

$pop1=mail($email, $subject, $image, $headers);

evreything works fine unless i send an email that doesnt exist, lets say:

$email = me@me.com

If i try to send this email, the SMTP server cant find the 'me.com domain so it should send an error mailto the "Return-Path" header, at least thats what i want, but the SMTP server send the error mail to the "From"

Plz, anyone know if im doing something wrong in the headers?

THX

putnamehere
02-23-2006, 12:32 PM
The first head should be,
$header =
not $header .=

NogDog
02-23-2006, 12:37 PM
Just a wild guess: try using a "simple" email address for the From attribute (just "name@site.com" instead of the the angle bracket format).

PS: the initial ".=" should not matter - it just appends to an empty string, which is fine (if a bit confusing, perhaps).

katasova
02-23-2006, 01:00 PM
It is not working nog dog, is it possible that my SMTP server cant read the return Path? i mean im almost sure evreything else is fine, just the return path is not working....

maybe if someone could try to send an email with ur SMTP really fast using my headers so i could know whats going on.

THX again