2011-10-20 8 views
1

1and1でホストされているcodeigniterウェブサイトでSMTP経由でメールを送信しようとしています。私は地元でそれをするとうまくいくが、私の1and1ホストから試してみるとすぐにエラーが出る。ここ1と1のホストでCodeigniterを使用してSMTPメールを送信する

は私の設定です:

$config['protocol'] = 'smtp'; 
$config['smtp_host'] = 'auth.smtp.1and1.fr'; //i'm in france and this is the SMTP server adress 1and1 gave me. 
$config['smtp_port'] = 25; 
$config['smtp_user'] = '[email protected]'; 
$config['smtp_pass'] = 'password'; 

、ここではエラーです:

The following SMTP error was encountered: 110 Connection timed out 
Unable to send data: AUTH LOGIN 
Failed to send AUTH LOGIN command. Error: 
Unable to send data: MAIL FROM: 

from: 

The following SMTP error was encountered: 
Unable to send data: RCPT TO: 

to: 

The following SMTP error was encountered: 
Unable to send data: DATA 

data: 

The following SMTP error was encountered: 
Unable to send data: //details about my message i removed 
Unable to send data: . 

The following SMTP error was encountered: 
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method. 

その後、私は代わりにauth.smtp.1and1.frのsmtp.1and1.comを使用しようとしました。驚いたことにそれは働いたが、実行には30秒かかりました! (そして私のlocalhost上では瞬間的です)。

提案がありますか?

答えて

0

サポートに問い合わせます。ポートに制限がある可能性があります。または、sendmailを使用します。

0

Hosting ServerとEmail Serverが同じ場所にある場合は、smtp認証の必要はありません。

したがって、設定ファイルから以下のコードを削除し、すべてをデフォルトのままにして機能を実行します。私のために働く。この場合、あなたのために働くべきです。

$config['protocol'] = 'smtp'; 
$config['smtp_host'] = 'auth.smtp.1and1.fr'; //i'm in france and this is the SMTP server adress 1and1 gave me. 
$config['smtp_port'] = 25; 
$config['smtp_user'] = '[email protected]domain.com'; 
$config['smtp_pass'] = 'password'; 
関連する問題