| | |
unable to send email to hotmail via php mail()
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jul 2008
Posts: 11
Reputation:
Solved Threads: 1
Hello,
I have been searching far and wide but am yet to find a solution, my php mail sends email to all addresses except hotmail (not weven junk).
Code:
$message = "Welcome to Sky Crew,
Your personal account for the Skye Crew has been created!
Your personal login ID and password are as follows:
userid: ******
password: *****
To log in, proceed to the following address:
http://www.skyecrew.co.za/login.php
Skye Crew Team
";
I have tried many different headers, messages and ways to write them yet still no success.
If you have any suggestions or a working php mail script which goes through to hotmail please help me, thank-you.
I have been searching far and wide but am yet to find a solution, my php mail sends email to all addresses except hotmail (not weven junk).
Code:
$message = "Welcome to Sky Crew,
Your personal account for the Skye Crew has been created!
Your personal login ID and password are as follows:
userid: ******
password: *****
To log in, proceed to the following address:
http://www.skyecrew.co.za/login.php
Skye Crew Team
";
PHP Syntax (Toggle Plain Text)
$headers= "From: Skye Crew<info@skyecrew.co.za>\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "X-Mailer: PHP4\n"; $headers .= "Content-Type: text/plain\r\n"; $headers .= "Content-Transfer-Encoding: 8bit\r\n"; $headers .= "Message-ID: \r\n"; mail($_POST['user'],"Your Password for the Skye Crew Website", $message, $headers);
I have tried many different headers, messages and ways to write them yet still no success.
If you have any suggestions or a working php mail script which goes through to hotmail please help me, thank-you.
Last edited by peter_budo; Aug 4th, 2008 at 12:47 pm. Reason: Keep It Organized - please use [code] tags
Hello, I use class.phpmailer.php. It works for Yahoo, Hotmail, GMail, and I'm sure many others that I haven't tested. It also includes an example which is easy to follow.
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
•
•
Join Date: Feb 2008
Posts: 3
Reputation:
Solved Threads: 1
Hi Keanan
You can try out this
You can try out this
php Syntax (Toggle Plain Text)
$headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: test@abc' . "\r\n"; mail($emailid, 'Test Mail', $message, $headers);
Last edited by peter_budo; Aug 5th, 2008 at 1:10 pm. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Jan 2008
Posts: 16
Reputation:
Solved Threads: 1
Hi,
I have successfully sent mail to an email address using the following code:
I have successfully sent mail to an email address using the following code:
php Syntax (Toggle Plain Text)
$headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>");
Last edited by peter_budo; Aug 5th, 2008 at 1:10 pm. Reason: Keep It Organized - please use [code] tags
I'm terribly sorry. I actually use class.smtp.php. I downloaded them both at the same time, got this one to work first, and haven't messed with it in over a year. The script actually has a login and password where you authenticate yourself to your mail exchange and then the email gets sent authentically from your mail exchange with lots of good safe header information that hotmail requires. I've never had a problem getting into hotmail or any other client with this class. It can also send both html and plain text email.
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
hello keanan...
see this link, will help to solve your problem...
http://bestdeveloper.blogspot.com/20...ig-emails.html
see this link, will help to solve your problem...
http://bestdeveloper.blogspot.com/20...ig-emails.html
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
Join Date: Jul 2008
Posts: 11
Reputation:
Solved Threads: 1
Hello,
Thank-you for replying and for your help - I have found the problem.
I used the smtp function in php mailer where I gave authentication etc. and still it didn't work - so i opened another hotmail account to be certain and still had same results.
I then sent an email from webmail to my hotmail accounts (which is the first thing I should have tried - sorry for any inconvenience caused) and the email donot go through - they only go through when replying to a email from hotmail - but unable to send.
So I will speak to our DNS people today as I am now certain it is blacklisted with hotmail.
Sorry to waste your time and thank-you.
;-)
Thank-you for replying and for your help - I have found the problem.
I used the smtp function in php mailer where I gave authentication etc. and still it didn't work - so i opened another hotmail account to be certain and still had same results.
I then sent an email from webmail to my hotmail accounts (which is the first thing I should have tried - sorry for any inconvenience caused) and the email donot go through - they only go through when replying to a email from hotmail - but unable to send.
So I will speak to our DNS people today as I am now certain it is blacklisted with hotmail.
Sorry to waste your time and thank-you.
;-)
![]() |
Other Threads in the PHP Forum
- Previous Thread: I need help wiht this
- Next Thread: script not allowing the user to login again if already logged in
Views: 2960 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date datepart directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link list login loop mail menu methods mlm mod_rewrite multiple mysql oop parse password paypal pdf php problem query radio random recursion regex remote script search select seo server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web webdesign xml youtube







