Mono Support Can't send activation email 

Viewed 49701 time(s), 13 post(s), 5/31/2011 3:25:11 PM - by gonzalom
5/31/2011 3:25:11 PM
345 Reputation 38 Total posts

Hello!

Some days ago someone from your team adviced me about the correct settings for a gmail account to be used for sending emails.
I set up the following in the app.config:

<mailSettings>
  <smtp deliveryMethod="Network" from="username@gmail.com">
    <network host="smtp.gmail.com" userName="username@gmail.com" password="MyPassword" port ="465" />
  </smtp>
</mailSettings>

But it's not working yet. There must be something else I should do. When creating a new user I'm lead to an error page stating that the account was created but I still need to activate it. However the activation email can't be sent.
I'm pasting bellow my signature the full exception message taken from the logs. In case this information helps, I've just done a new clean installation.
Thanks in advance,

Gonzalo.


2011-05-31 12:12:11,592 [16] ERROR MonoX [::1] - Error
System.ApplicationException: An uexpected error has occured while sending you an activation e-mail. Your account has been successfully created but you can't login until you activate it via activation e-mail. To resend your activation e-mail please go to the <a href="/Membership/ActivationEmailRecovery.aspx">Activation e-mail recovery</a> page. If the problem persists, please contact us.
at MonoSoftware.MonoX.ModuleGallery.MembershipEditor.#Xn(Object sender, EventArgs e)
at MonoSoftware.MonoX.Controls.StyledButton.OnClick(Object sender, EventArgs e)
at MonoSoftware.MonoX.Controls.StyledButton.#Gk(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2011-05-31 12:12:11,629 [16] ERROR MonoX [BaseHttpApplication] - Application Error
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ApplicationException: An uexpected error has occured while sending you an activation e-mail. Your account has been successfully created but you can't login until you activate it via activation e-mail. To resend your activation e-mail please go to the <a href="/Membership/ActivationEmailRecovery.aspx">Activation e-mail recovery</a> page. If the problem persists, please contact us.
at MonoSoftware.MonoX.ModuleGallery.MembershipEditor.#Xn(Object sender, EventArgs e)
at MonoSoftware.MonoX.Controls.StyledButton.OnClick(Object sender, EventArgs e)
at MonoSoftware.MonoX.Controls.StyledButton.#Gk(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.membership_register_aspx.ProcessRequest(HttpContext context) in c:\Users\Gonzalo\AppData\Local\Temp\Temporary ASP.NET Files\root\42061eb3\c64814a4\App_Web_oifkdxix.1.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

1
5/31/2011 4:31:59 PM
7207 Reputation 956 Total posts

Let's try this for gmail's SMTP server:

<network host="smtp.gmail.com" userName="username@gmail.com" password="MyPassword" port ="465" enableSsl ="true" defaultCredentials ="false" />

If I remember correctly, it also works on port 587, so you may try that one also.
Also, please dobule check your username, password, and the firewall (to see if the port used is not blocked).

2
6/1/2011 3:49:45 PM
345 Reputation 38 Total posts

Hi Denis,

This is what finally worked for me:

<mailSettings>
  <smtp deliveryMethod="Network" from="username@gmail.com">
    <network host="smtp.gmail.com" userName="username@gmail.com" password="MyPassword" port ="587"  defaultCredentials ="false" />
  </smtp>
</mailSettings>

Thanks,

Gonzalo

3
9/6/2011 9:51:17 PM
659 Reputation 84 Total posts

hello, i've been trying the same thing with my project with the lines of the post above, and my gmail account/pass but i keep getting this error, what could be the problem?

4
9/6/2011 10:15:08 PM
659 Reputation 84 Total posts

Do i have to activate the ISS smtp ?

5
9/7/2011 7:39:36 AM
7207 Reputation 956 Total posts

Hi David,
the settings published above should work. You may want to step into debugger one line higher (at catch (Exception eception)), and see what the underlying exception is.
Could you also open a new thread for your issue, so we don't distrub the original poster with the continued conversation (as he is receiving e-mail alerts when somebody posts a new message)?

6
2/20/2013 7:38:09 PM
10 Reputation 2 Total posts

hello sir! i am also having a problem in sending activation link in email. i saw someone's post here regarding this matter. where can i apply or what kind of code is this:
<mailSettings>  <smtp deliveryMethod="Network" from="username@gmail.com">    <network host="smtp.gmail.com" userName="username@gmail.com" password="MyPassword" port ="587" defaultCredentials ="false" /> 
 </smtp></mailSettings>

7
2/20/2013 7:47:33 PM
7207 Reputation 956 Total posts

You should enter these settings into the main web.config file.

8
2/20/2013 8:32:05 PM
10 Reputation 2 Total posts

I think i'm on the wrong track sir. My problem is all about php code. I think it is not related here. But thanks anyway.

9
10/13/2013 8:31:39 AM
5 Reputation 1 Total posts

I have different issue. 
I have hosted Monox over GoDaddy virtual private server. Above Google Apps / Gmail settings work fine for me - but whenever I am trying GoDaddy's email I am coming across error. My server details as provided by GoDaddy are - 
POP
pop.asia.secureserver.net
IMAP
imap.asia.secureserver.net
SMTP
smtpout.asia.secureserver.net

Can you please let me know what settings I should do ? 

10
1 2
This is a demo site for MonoX. Please visit Mono Software for more info.