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.

How to programatically send an e-mail with MonoX  (Mono Support )

Viewed 99185 time(s), 3 post(s) 2/21/2011 10:54:38 AMby imarusic
imarusic

imarusic

2/21/2011 10:57:37 AM
Hi,

I'm developing a small hello world application with MonoX and now I need to  programatically send an e-mail with MonoX. How can I do that ?
This content has not been rated yet. 
3016 Reputation 428 Total posts
khorvat

khorvat

2/21/2011 11:07:37 AM
Hi imarusic,

there are  two ways to send an e-mail programatically:

1. you can use Asp.net SmtpClient to send an e-mail you can read more about it here.
2. You can use the MonoX built in MonoXMailSender to send mail:
- You can use one or more simple methods such as "SendMail(toAddress, title, plainContent)", "SendMail(fromAddress, toAddress, title, htmlContent, plainContent)"
- you can also send an e-mail asynchronously with "SendMailAsync()" but before using this method you need to add all your mail messages to MailQueue which is a property of MonoXMailSender class
This content has not been rated yet. 
15993 Reputation 2214 Total posts
imarusic

imarusic

2/21/2011 11:13:16 AM
Great, thanks.
This content has not been rated yet. 
3016 Reputation 428 Total posts