2010年5月8日 星期六

SMTP 模組 使用Gmail做為SMTP Server的方法

使用Gmail做為SMTP Server的方法

----------

SMTP Authentication Support

----------
Turn this module On or Off:
On

SMTP SERVER:
smtp.gmail.com

SMTP Backup SERVER:
空白

SMTP PORT:
465 (Gmail的port比較特別 一般都是port 25)

Use encrypted protocol:
Use SSL (需另外再做設定才會有此選項可選 預設只有"否")

使用者名稱:
你的Gmail帳號 (含@gmail.com)

密碼:
你的Gmail密碼

E-mail from:
你設定從哪個信箱寄出的E-mail

E-mail from name:
你設定的寄件者名稱

E-mail address to send test email too:
收所寄發測試信件的E-mail

----------php.ini----------
修改\apache\bin\資料夾下的php.ini檔:

將:
extension=php_openssl.dll
extension=php_smtp.dll
這兩行的註解給取消掉

修改:
[mail function]
; For Win32 only.
SMTP = smtp.gmail.com
smtp_port = 465

; For Win32 only.
;sendmail_from = 你的Gmail帳號 (含@gmail.com)


另外特別要注意的是
要啟動OpenSSL的功能
得將\apache\bin\資料夾下的:
ssleay32.dll
libeay32.dll
將這兩個檔複製到:C:\Windows\System32\目錄下
設定成功後就可以看到Drupal SMTP模組下的
Use encrypted protocol新增兩個選項:

Use SSL (選擇)
Use TLS


成功!!

沒有留言:

張貼留言