Skip to main content

Thread: Mono issue with SMTP


hello everybody!

developed application .net 2.0 programatically sends e-mails targets, using smtp protocol. tested application on windows, using google account smtp configuration, ssl enabled, smtp host: smtp.google.com , smtp port: 587.

on mono ubuntu 9.10, throws exception pertaining ssl (ssl authentication failure , like). method code here:

code:
private void sendemail(string toaddress)          {              try              {                  mailaddress mailaddressfrom = new mailaddress(fromaddress, fromname);                  mailaddress mailaddressto = new mailaddress(toaddress);                    mailmessage emailmessage = new mailmessage(mailaddressfrom, mailaddressto);                  emailmessage.bodyencoding = encoding.utf8;                  emailmessage.isbodyhtml = false;                  emailmessage.subject = subject;                  emailmessage.body = content;                    networkcredential emailcredential = new networkcredential(fromaddress, password);                  smtpclient mailclient = new smtpclient(smtphost, smtpport);                  mailclient.enablessl = enablessl;                  mailclient.usedefaultcredentials = false;                  mailclient.credentials = emailcredential;                    mailclient.send(emailmessage);                    console.out.writeline("e-mail " + toaddress + " sent.");              }                catch (exception)              {                  console.error.writeline("failure sending e-mail " + toaddress + "!");              }          }
i want ask if issue mono libraries related, or happens because of default firewall settings in ubuntu 9.10.

best,
mihnea

can copy&paste exception message? without knowing it, can guess.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Mono issue with SMTP


Ubuntu

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'