Jump to content

inbox mail rather than junk mail


sungpeng

Recommended Posts

two options

have a play around, try changing the "from" email to a legitimate email and putting a space between From: and [email protected],

also you don't need \r\n in the header unless you do another line, i.e. reply-to

 

The example given at http://php.net/manual/en/function.mail.php is

<?php
$to      = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

 

Another option is to use something like the PHP Mailer class which I have found extremely useful.

http://phpmailer.worxware.com/

 'Reply-To: [email protected]' . "\r\n" . 
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);

 

The above code sent a message to inbox not junk mail.. but the result is as follow..

 

From:	 [email protected]
Sent:	 03 July 2010 20: 13PM
To:	[email protected]

 

The "FROM" is not "[email protected]" instead it is "[email protected]".. can I know is there any solution to it?

change the hostingserver.com domain to your server the script is being run on.

i.e. if you're domain is www.sungpeng.com, change it to [email protected]

 

Is [email protected] your actual email? Obviously your spam filter is picking it up as spam, probably because its allegedly a email from a hotmail account coming from another domain, although I'm not 100% sure on what triggers said spam filters.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.