PHP Classes

Hotmail Configuration

Recommend this page to a friend!

      MIME E-mail message sending  >  MIME E-mail message sending package blog  >  How Can PHP Send Emai...  >  All threads  >  Hotmail Configuration  >  (Un) Subscribe thread alerts  
Subject:Hotmail Configuration
Summary:Configuration for users with address different from .com
Messages:13
Author:Alessio Dev
Date:2009-05-05 18:30:46
Update:2009-05-07 14:23:47
 
  1 - 10   11 - 13  

  1. Hotmail Configuration   Reply   Report abuse  
Picture of Alessio Dev Alessio Dev - 2009-05-05 18:30:46
Hi, i was trying to configure a script using this class for sending emails with my Hotmail account but it doesn't work. My email address ends with @hotmail.it, i know that the smtp is still smtp.live.com but when calling the following methods:

$email_message->localhost="localhost";
$email_message->smtp_host="smtp.live.com";
$email_message->smtp_port=25;
$email_message->smtp_ssl=0;
$email_message->smtp_start_tls=1;
$email_message->smtp_direct_delivery=0;
$email_message->smtp_exclude_address="";
$email_message->smtp_user="*****@hotmail.it";
$email_message->smtp_password="*****";
$email_message->smtp_pop3_auth_host="";
$email_message->smtp_realm="";
$email_message->smtp_workstation="";
$email_message->smtp_authentication_mechanism="";

, i got this error:
Starting TLS cryptograpic protocol
TLS started
Error: 535 5.0.0 Authentication Failed

I'm running on localhost and if i want to send emails with my gmail account, it works (with the right parametres, for gmail: tls=0 ssl=1, port=465). I can't understand where i'm wrong because the username in hotmail is the same as the email address. Does anyone know why this happen?

Thanks

  2. Re: Hotmail Configuration   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-05-05 19:28:47 - In reply to message 1 from Alessio Dev
I suppose either the account or password are wrong, or the account is disabled.

  3. Re: Hotmail Configuration   Reply   Report abuse  
Picture of Alessio Dev Alessio Dev - 2009-05-06 02:04:18 - In reply to message 2 from Manuel Lemos
I also made a new account just for testing but it doesn't work. The account is enabled. The parametres i use are the same as i wrote in the previous message. SSL=0, TLS=1 Port=25 SMTP=smtp.live.com . I don't know where is the error...i'm running on localhost and with the configuration for gmail it works. This is what the server says (smtp_debug=1):

Resolving SMTP server domain "smtp.live.com"...
Connecting to host address "65.55.172.254" port 25...
Connected to SMTP server "smtp.live.com".
S 220 BLU0-SMTP93.blu0.hotmail.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.2668 ready at Tue, 5 May 2009 19:03:38 -0700
C EHLO localhost
S 250-BLU0-SMTP93.blu0.hotmail.com Hello [79.46.4.127]
S 250-TURN
S 250-SIZE 35840000
S 250-ETRN
S 250-PIPELINING
S 250-DSN
S 250-ENHANCEDSTATUSCODES
S 250-8bitmime
S 250-BINARYMIME
S 250-CHUNKING
S 250-VRFY
S 250-TLS
S 250-STARTTLS
S 250 OK
C STARTTLS
S 220 2.0.0 SMTP server ready
Starting TLS cryptograpic protocol
TLS started
C EHLO localhost
S 250-BLU0-SMTP93.blu0.hotmail.com Hello [79.46.4.127]
S 250-TURN
S 250-SIZE 35840000
S 250-ETRN
S 250-PIPELINING
S 250-DSN
S 250-ENHANCEDSTATUSCODES
S 250-8bitmime
S 250-BINARYMIME
S 250-CHUNKING
S 250-VRFY
S 250-AUTH LOGIN PLAIN
S 250 OK
C AUTH LOGIN
S 334 VXNlcm5hbWU6
C ZWFzeXNlbGxAaG90bWFpbC5pdA==
S 334 UGFzc3dvcmQ6
C Z29yaWFkbWluaXN0cmF0b3I=
S 535 5.0.0 Authentication Failed
Error: 535 5.0.0 Authentication Failed

Thanks

  4. Re: Hotmail Configuration   Reply   Report abuse  
Picture of Alessio Dev Alessio Dev - 2009-05-06 02:10:09 - In reply to message 3 from Alessio Dev
I forgot, for Hotmail, the username is the same as the email-address so both the variable $from_address and the method $email_message->smtp_user="**@hotmail.it" have to have the same value. I can't see the error, it's weird. Also can i use an account of yahoo? a normal one, not premium because on my domain i have the ports 465 and 587 blocked. so i can't use this class online! Hotmail was perfect because the port is 25 but it doesn't work. For any suggestions, i'm here!

Thanks

  5. Re: Hotmail Configuration   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-05-06 02:22:03 - In reply to message 4 from Alessio Dev
I tried using an account of hotmail.com and it works. Have you tried using the same user name but under hotmail.com domain?

Yahoo only allows premium users to use their SMTP service.

  6. Re: Hotmail Configuration   Reply   Report abuse  
Picture of Alessio Dev Alessio Dev - 2009-05-06 12:01:39 - In reply to message 5 from Manuel Lemos
No because Hotmail allows only to create accounts for your country now. I can't create one with hotmail.com anymore. They changed this thing a few time ago...Anyways i can read and send the email using a mail client like thunderbird with my account @hotmail.it with the smtp: smtp.live.com because that is still the same. That's why i became crazy with the configuration i used! Maybe they changed something on their smtp. What do you think?

  7. Re: Hotmail Configuration   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-05-06 22:38:13 - In reply to message 6 from Alessio Dev
That is odd because I just created a new account in Hotmail, I said I am from Italy and it only allowed creating hotmail.com and live.com, and I am neither from the US nor Italy.

Anyway, I just tried sending the message via this account. Please try using it now and let me know if it works:

user: test.smtp@hotmail.com
password: testsmtp

  8. Re: Hotmail Configuration   Reply   Report abuse  
Picture of Alessio Dev Alessio Dev - 2009-05-06 23:46:02 - In reply to message 7 from Manuel Lemos
Now it works! so the problem is that the script doesn't want addresses different from @hotmail.com . I can't see any other solution. The one with @hotmail.it didn't work. I have been trying with more than 3 different accounts (@hotmail.it) but nothing. Just another question, how could u create an account with the extension .com? i read that it is not possible anymore...if u want me to give u the user and the password of the account i used, just ask me.

Thanks

  9. Re: Hotmail Configuration   Reply   Report abuse  
Picture of Alessio Dev Alessio Dev - 2009-05-06 23:51:57 - In reply to message 8 from Alessio Dev
I was thinking that it is really weird because the smtp address is right even if my email account is @hotmail.it . Thunderbird can send mail with the same configuration. While using addresses @hotmail.com, there are no problems as i saw using the test account u told me. Maybe there is another smtp address, what do u think about it? But it still remains weird cause of thunderbird that accepts smtp.live.com

  10. Re: Hotmail Configuration   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-05-07 00:00:33 - In reply to message 8 from Alessio Dev
If you can send messages to the same SMTP server via Thunderbird, I suspect that you are not using the correct account and password in the PHP script.

I could not get a hotmail.it account. If you can send me an hotmail.it account that you tried, I can verify whether it is a password problem or Thunderbird is doing anything different.

 
  1 - 10   11 - 13