Environment | Ucommerce |
Question/Problem description | Completing the checkout results in a yellow screen if web.config does not contain mail settings. |
Steps to reproduce | Configure the checkout flow. Configure Email profile. Remove <MailSettings> content from web.config. Run through the checkout flow. |
Error message | [InvalidOperationException: The SMTP host was not specified.] System.Net.Mail.SmtpClient.CheckHostAndPort() +109 System.Net.Mail.SmtpClient.Send(MailMessage message) +329 Ucommerce.Transactions.EmailService.Send(ILocalizationContext localizationContext, EmailProfile profile, String emailTypeName, MailAddress to, IDictionary`2 templateParameters) +1007 Ucommerce.Pipelines.Common.SendEmailTask.Execute(PurchaseOrder purchaseOrder) +536 Ucommerce.Pipelines.Pipeline`1.Execute(T subject) +339 |
Resolution | Add the following SMTP configuration <mailSettings> <smtp from="yourmail@gmail.com"> <network host="smtp.gmail.com" port="587" userName="yourmail@gmail.com" password="yourpassword" enableSsl="true"/> </smtp> </mailSettings> |
Workaround |
SMTP host was not specified Print
Modified on: Thu, 18 Nov, 2021 at 12:47 PM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.