an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Development > General Programming > SendMail: no mail and error
Last Post 5/15/2011 6:43:55 PM By hlopezrd. 4 replies.
5/10/2011 5:55:35 PM
hlopezrd
Posts: 14
Joined: 4/3/2009
SendMail: no mail and error
 Hi to all,
I configure my STP setting (in Web.config).
But when I check out an order I don't get any email. Where I can see what is happend?
 
And when I try to use the "Tell a Friend" option, I got the following error:
 
SendEmail()
EmailManager.Send("TellFriend", tokens, hidFrom.Value, new string[] { etbEmail.Text });
 
System.FormatException occurred
  Message=The specified string is not in the form required for an e-mail address.
  Source=System
  StackTrace:
       at System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName)
       at System.Net.Mail.MailAddress.ParseValue(String address)
       at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
       at System.Net.Mail.MailMessage..ctor()
       at DotShoppingCart.Commercial.Core.EmailManager.SendEmail(String subject, String content, NameValueCollection tokensToReplace, String from, ICollection`1 to, ICollection`1 bcc)
       at DotShoppingCart.Commercial.Core.EmailManager.Send(String host, String templateName, NameValueCollection tokensToReplace, String from, ICollection`1 to, ICollection`1 bcc)
       at DotShoppingCart.Commercial.Core.EmailManager.Send(String templateName, NameValueCollection tokensToReplace, String from, ICollection`1 to)
       at Store_TellFriend.SendEmail() in ..\TellFriend.ascx.cs:line 61
  InnerException: 
 
What can I do?
5/11/2011 10:15:53 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: SendMail: no mail and error
Check if you set up Admin > Site > General > Site Email . If so, search smtp in web.config and check the settings are correct.
DotShoppingCart Staff
5/11/2011 9:21:51 PM
hlopezrd
Posts: 14
Joined: 4/3/2009
Re: SendMail: no mail and error
 Hi lukey,
Thanos for your help.
 
I check, and the site mail it's ok.
 
My Web.config SMTP config is:
 
<system.net>
<span class="Apple-tab-span" style="white-space:pre"> </span><mailSettings>
<span class="Apple-tab-span" style="white-space:pre"> </span><smtp deliveryMethod="network" from="Mi Tienda">
<span class="Apple-tab-span" style="white-space:pre"> </span><network host="mail.midominio.com" userName="compras@midominio.com" password="fake123" port="25" defaultCredentials="false"/>
<span class="Apple-tab-span" style="white-space:pre"> </span></smtp>
<span class="Apple-tab-span" style="white-space:pre"> </span></mailSettings>
 
I test this setting making a program using WinForm (with C#) and work fine.
But in the site, still I have the problem (error when use the option Tell a Friend, and don't get mail when I do checkout).
 
What can I do?
5/13/2011 8:34:07 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: SendMail: no mail and error
Your SMTP config seems wrong. The "from" attribute should be a valid email address that is sent from.
 
<smtp deliveryMethod="network" from="Mi Tienda">
DotShoppingCart Staff
5/15/2011 6:43:55 PM
hlopezrd
Posts: 14
Joined: 4/3/2009
Re: SendMail: no mail and error
 Hi to all,
Thanks for help.
I saw another post and check my smtp setting, after that was ok.
Thanks.