how to send mail using ASP.NET

Posted by balajirnaukri-12656 under ASP.NET on 4/27/2012 | Points: 10 | Views : 1786 | Status : [Member] | Replies : 5
How to send mail using ASP.NET.

I am having the following doubts

1.)Is it required we should have the server for sending the mail???.

2.).Is it possible to send mail with the services of our local machine???

3)Does IIS in our local machine helps to send mail.????????

Thanks and Regards
Balaji.R
ASP.NET Devloper
Solve-IT corp



Responses

Posted by: Gaur1982 on: 4/27/2012 [Member] Starter | Points: 25

Up
0
Down
You can check this post in this post I have mentioned the code of How to send mail with attachment through coding?

http://planetofcoders.com/send-mail-attachment-coding/

Gaurav Agrawal
http://www.planetofcoders.com/

balajirnaukri-12656, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 4/27/2012 [Member] Starter | Points: 25

Up
0
Down
You need to have server... If you are in an office you can get the server IP from Thunderbirs or Outlook.

No Need of IIS. Its not exactly possible to send mail with the services of local machine... I you got the way to do it with jus local machine.. Let me also know... I am also trying that..


Dim mail As New MailMessage



mail.From = New MailAddress("From Address")



mail.To.Add("To Address")



mail.Subject = "Your Subject"



mail.Body ="Your Mail Body"



Dim smtp As New SmtpClient



smtp.Host = <"Host Ip Address">



smtp.Port = <your port number>



smtp.Send(mail)




This code is 100% working.. you can try

____________
www.flickr.com/photos/psdesigner/

balajirnaukri-12656, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Veerac85 on: 4/30/2012 [Member] Starter | Points: 25

Up
0
Down
you could use your local SMTP server or some third party tool like SMTP DEV or GMAIL/HOTMAIL/YAHOO smtp servers for sending emails. Take a look at this article. It has complete details on how to use above mentioned SMTP outgoing servers to send emails.
http://technico.qnownow.com/2012/03/21/how-to-send-an-email-with-attachment-in-c-using-smtp4dev-gmail-hotmail-yahoo-smtp-servers/

balajirnaukri-12656, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: perfectchourasia-9163 on: 5/1/2012 [Member] Starter | Points: 25

Up
0
Down
http://sandeep-chourasia.blogspot.in/2011/05/send-mail-in-aspnet.html

ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://www.aspnetcodes.com/

balajirnaukri-12656, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Taanu51 on: 5/3/2012 [Member] Starter | Points: 25

Up
0
Down
Hi..Check this articles it helps you a lot......

Send mail using Asp.net

http://www.developerscode.com/2011/05/how-to-send-mail-using-aspnet-with-c.html

Send Mail using Asp.net with multiple attachments

http://www.developerscode.com/2011/02/how-to-send-email-with-multiple.html



Tanisha Sayyad
.Net and Android Developer
INDIA(Andhra Pradesh)

balajirnaukri-12656, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response