2012-03-10 73 views
0

所以我想在Debian Lenny中設置PHP郵件。在Debian Lenny中設置PHP郵件

我跟着本教程:http://www.thewireframecommunity.com/node/39,我已經安裝了ssmtp與aptitude install ssmtp

我的電子郵件服務提供商GoDaddy的是讓我的MX記錄是:enter image description here

這是我ssmtp.conf文件:

# Config file for sSMTP sendmail 
# 
# The person who gets all mail for userids < 1000 
# Make this empty to disable rewriting. 
[email protected] 

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com 
mailhub=smpt.europe.secureserver.net 

# Where will the mail seem to come from? 
rewriteDomain=example.com 

# The full hostname 
hostname=smtp.europe.secureserver.net 

# Are users allowed to set their own From: address? 
# YES - Allow the user to specify their own From: address 
# NO - Use the system generated From: address 
FromLineOverride=NO 


[email protected] 
AuthPass=PASSWORD 
UseSTARTTLS=yes 
UseTLS=yes 

其中example.com是我的域名。 我得到這個錯誤:

# ssmtp: Cannot open smtp.europe.secureserver.net:25

當使用電子郵件客戶端,我總是用smtpout.europe.secureserver.net而不是SMTP ...但我仍然得到同樣的錯誤,當我試圖更改配置文件。

我在做什麼錯了?

+0

我不明白GoDaddy,但是如果您的SMTP服務器使用SSL/TLS(不是用於身份驗證,而是用於實際郵件),那麼您應該在PHP中以某種方式定義它。現在,您正在使用SMTP的非SSL端口25。 – Ynhockey 2012-03-10 19:23:37

+0

感謝您的建議。 GoDaddy不需要SSL身份驗證進行傳出,只需傳入。 – jQuerybeast 2012-03-10 19:26:03

回答

0

您的ISP可能會阻止到端口25的出站連接。通常端口587是一個備用端口。

1

我不知道你是否錯誤地輸入了這個論壇,但是你的mailhub應該是smtp.europe.secureserver.net,而不是smpt.europe.secureserver.net。