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:
i want ask if issue mono libraries related, or happens because of default firewall settings in ubuntu 9.10.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 + "!"); } }
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
Post a Comment