MonoX 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.

What are all the email settings needed for ssl smtp server like gmail? (Closed) (Mono Support )

Viewed 77825 time(s), 7 post(s) 24.04.2012 23:41:47by Jeremy

Related topics

Jeremy

Jeremy

24.04.2012 23:41:47
Hi,

From reading other posts, it seems like the web.config settings needed are:

<appSettings>
  <add key="MailFromAddress" value="mygmailname@gmail.com"/>
  <add key="EnableSmtpSSL" value="true"/>
</appSettings
<
system.net>
  <mailSettings>
    <smtp deliveryMethod="Network" from="mygmailname@gmail.com">
      <network host="smtp.gmail.com" userName="mygmailname@gmail.com" password="mygmailpassword" port="587" enableSsl="true" defaultCredentials="false" />
    </smtp>
  </mailSettings>
</system.net>

but I am getting the following error:

2012-04-25 09:23:41,404 [23] ERROR MonoX [admin] - An error has occured while sending you an e-mail. Please try again, if the problem persists, please contact us.
at MonoSoftware.MonoX.Mail.MonoXMailSender.SendMail(MailMessage mailMsg)
at MonoSoftware.MonoX.ModuleGallery.ContactFormModule.btnSend_Click(Object sender, EventArgs e)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. nv9sm15781248pbb.35
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 MonoSoftware.Core.Mail.MailSender.SendMail(MailMessage mailMsg)

I have checked the web.config settings by successfully sending an email using this code:

protected virtual void SendTestEmail(object sender, EventArgs e)
{//test sending email using gmail in web.config - works!
    MailMessage mailMsg = new MailMessage();
    mailMsg.To.Add("myhotmailname@hotmail.com");
    mailMsg.Subject = "Subject";
    mailMsg.Body = "Hi there, blah blah blah ... Regards me";
    mailMsg.IsBodyHtml = true;
 
    SmtpClient client = new SmtpClient();
    client.Send(mailMsg);
}


Is there another monox setting that I am missing to get the contact page to send an email?

I am using MonoX v4.7.40.3486 [4/18/2012], DB v4.7.3321

Dieser Inhalt wurde noch nicht bewertet. 
322 Reputation 36 Total posts
Jeremy

Jeremy

25.04.2012 04:10:48
Yes, There is a check box "Enable SSL" on the Contact Form web part as well which overrides both the web.config settings. It can also be set declaratively:

<MonoX:ContactForm ID="ctlContact" runat="server"
A_WebSiteName="MonoX Demo" A_Address="Bihacka 1d" A_City="Osijek"
A_ZipCode="31000" A_Country="Croatia" A_Phone="+385 31 213 966" A_Fax="+385 31 213 967"  EnableSSL="true" A_EMail="info@domain.com"          
></MonoX:ContactForm>

After setting EnableSSL="true" on the web part everything started working.
Dieser Inhalt wurde noch nicht bewertet. 
322 Reputation 36 Total posts
khorvat

khorvat

25.04.2012 06:33:56
Hi,

yes we did preset EnableSSL to false on ContactForm module so you have to change it or remove it completely.

Let us know if you need anything else.

Regards
Dieser Inhalt wurde noch nicht bewertet. 
15993 Reputation 2214 Total posts
ruslanruslan

ruslanruslan

18.07.2013 19:43:02
Hi!

give me please advice how to use certifications? i need to put this in message send code:

ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };
               SmtpServer.Send(mail);
Dieser Inhalt wurde noch nicht bewertet. 
123 Reputation 15 Total posts
khorvat

khorvat

19.07.2013 06:59:28
Hi,

you will have to build your own mail send functionality in order to add custom functionality. I can provide you with code snippets but you will have to let me know where do you want to include the above code ?

Can you please open a new topic for your issue ?

Thanks
Dieser Inhalt wurde noch nicht bewertet. 
15993 Reputation 2214 Total posts
Mazen

Mazen

25.03.2014 17:50:24
Hi guys,

I configured the smtp in the web.config and i enable the SSL via the admin panel everything works, when there is a new topic in the discussion i get a mail.
 
I wanted to ask if there is a possibilty to get a mail when a discussion is created ? if there is, how ? 

Thank you

Dieser Inhalt wurde noch nicht bewertet. 
30 Reputation 4 Total posts
khorvat

khorvat

26.03.2014 08:45:55
Hi,

can you please open a new topic for your issue, as we tend not to post to 2 year old topics. Also please elaborate this in your next post:
"I wanted to ask if there is a possibilty to get a mail when a discussion is created ? if there is, how ? "

Regards
Dieser Inhalt wurde noch nicht bewertet. 
15993 Reputation 2214 Total posts