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 )

99989 put(a) pogledan, 3 odgovor(a) 21.2.2011. 10:54:38Kreirao(la) imarusic
imarusic

imarusic

21.2.2011. 10:57:37
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 ?
Ovaj sadržaj još nije ocijenjen. 
3016 Reputacija 428 Ukupno objava
khorvat

khorvat

21.2.2011. 11:07:37
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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
imarusic

imarusic

21.2.2011. 11:13:16
Great, thanks.
Ovaj sadržaj još nije ocijenjen. 
3016 Reputacija 428 Ukupno objava