Mono support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Mono Support Can't send activation email 

Viewed 11439 time(s), 9 post(s). 5/31/2011 3:25:11 PMby gonzalom
gonzalom
1

gonzalom 5/31/2011 3:25:11 PM

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)

This content has not been rated yet. 
345 Reputation 38 Total posts
denis
2

denis 5/31/2011 4:31:59 PM

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).
This content has not been rated yet. 
6785 Reputation 874 Total posts
gonzalom
3

gonzalom 6/1/2011 3:49:45 PM

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
This content has not been rated yet. 
345 Reputation 38 Total posts
DavidGarcia
4

DavidGarcia 9/6/2011 9:51:17 PM

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?
This content has not been rated yet. 
659 Reputation 84 Total posts
DavidGarcia
5

DavidGarcia 9/6/2011 10:15:08 PM

Do i have to activate the ISS smtp ?
This content has not been rated yet. 
659 Reputation 84 Total posts
denis
6

denis 9/7/2011 7:39:36 AM

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)?
This content has not been rated yet. 
6785 Reputation 874 Total posts
ragnylromero
7

ragnylromero 3 month(s) ago

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>
This content has not been rated yet. 
10 Reputation 2 Total posts
denis
8

denis 3 month(s) ago

You should enter these settings into the main web.config file.
This content has not been rated yet. 
6785 Reputation 874 Total posts
ragnylromero
9

ragnylromero 3 month(s) ago

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.
This content has not been rated yet. 
10 Reputation 2 Total posts