我試圖讓Sitecore通過Gmail帳戶發送郵件,但它不會工作。 這是我的設置在web.config中:通過Gmail發送Sitecore電子郵件
<setting name="MailServer" value="smtp.gmail.com" />
<!-- MAIL SERVER USER
If the SMTP server requires login, enter the user name in this setting
-->
<setting name="MailServerUserName" value="[email protected]" />
<!-- MAIL SERVER PASSWORD
If the SMTP server requires login, enter the password in this setting
-->
<setting name="MailServerPassword" value="secret" />
<!-- MAIL SERVER PORT
If the SMTP server requires a custom port number, enter the value in this setting.
The default value is: 25
-->
<setting name="MailServerPort" value="587" />
這是從日誌中的錯誤:
6068 09:14:57 ERROR Failed to send analytics report
Exception: System.Net.Mail.SmtpException
Message: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. u9sm3416817eeh.17
Source: System
at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from)
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Sitecore.MainUtil.SendMail(MailMessage message)
at Sitecore.Analytics.Reports.ReportMailer.Mail(String exportedReportFileName, IEnumerable`1 recipients, String reportTitle, Boolean embedFile, Boolean deleteFile)
我知道它有事情做與Gmail需要某種形式的安全連接,但我如何讓Sitecore提供這個功能?
謝謝你,Stunnel的工作作爲一個魅力! – Zooking 2010-09-16 14:17:29