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

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

Viewed 17547 time(s), 4 post(s). 2/21/2011 10:54:38 AMby imarusic
imarusic
1

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 ?
Rated 5.00, 1 vote(s). 
2094 Reputation 272 Total posts
johnson
2

johnson 2/21/2011 11:01:08 AM

Use MonoX Send Email class inside your project.
This content has not been rated yet. 
702 Reputation 19 Total posts
khorvat
3

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
Rated 5.00, 1 vote(s). 
11576 Reputation 1649 Total posts
imarusic
4

imarusic 2/21/2011 11:13:16 AM

Great, thanks.
This content has not been rated yet. 
2094 Reputation 272 Total posts