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? (Zatvorena) (Mono Support )

76604 put(a) pogledan, 7 odgovor(a) 24.4.2012. 23:41:47Kreirao(la) Jeremy

Povezane teme

Jeremy

Jeremy

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

Ovaj sadržaj još nije ocijenjen. 
322 Reputacija 36 Ukupno objava
Jeremy

Jeremy

25.4.2012. 4: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.
Ovaj sadržaj još nije ocijenjen. 
322 Reputacija 36 Ukupno objava
khorvat

khorvat

25.4.2012. 6: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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
ruslanruslan

ruslanruslan

18.7.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);
Ovaj sadržaj još nije ocijenjen. 
123 Reputacija 15 Ukupno objava
khorvat

khorvat

19.7.2013. 6: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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
Mazen

Mazen

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

Ovaj sadržaj još nije ocijenjen. 
30 Reputacija 4 Ukupno objava
khorvat

khorvat

26.3.2014. 8: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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava