Can we send a mail using asp.net without the server???
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suthish NairPosted Dec 23, 2010, 12:51 PM
check our Our recommended articles section, right side of window.
Sam HobbsPosted Dec 23, 2010, 6:50 AM
Soft CornerPosted Dec 23, 2010, 6:46 AM
go thro' this link u will findout one library Indy.Sockets which is useful for receiving mail in asp.net
http://www.codeproject.com/KB/IP/POP3ClientByChadZHower.aspx
( if ur using gmail then might need to do some settings also in gmail
settings->Forwarding & POP/IMAP -> enable POP for all mail & enable IMAP )
prajwal kpPosted Dec 23, 2010, 6:08 AM
Soft CornerPosted Dec 23, 2010, 4:40 AM
http://www.c-sharpcorner.com/UploadFile/prathore/emailSending01052009031339AM/emailSending.aspx
http://www.c-sharpcorner.com/UploadFile/anjudidi/SendMultipleEmail09092009013702AM/SendMultipleEmail.aspx
Krishna GaradPosted Dec 23, 2010, 4:37 AM
Sam HobbsPosted Dec 23, 2010, 4:30 AM
Soft CornerPosted Dec 23, 2010, 4:07 AM
Krishna GaradPosted Dec 23, 2010, 4:07 AM
prajwal kpPosted Dec 23, 2010, 3:41 AM
Sam HobbsPosted Dec 23, 2010, 3:39 AM
Soft CornerPosted Dec 23, 2010, 3:37 AM
Take this one example of Console application :-
Note In visual Studio 2005, you do not have to click Select.
using System;
using System.Web.Mail;
namespace WebMail
{
class Class1
{
static void Main(string[] args)
{
try
{
MailMessage oMsg = new MailMessage();
// TODO: Replace with sender e-mail address.
oMsg.From = "[email protected]";
// TODO: Replace with recipient e-mail address.
oMsg.To = "[email protected]";
oMsg.Subject = "Send Using Web Mail";
// SEND IN HTML FORMAT (comment this line to send plain text).
oMsg.BodyFormat = MailFormat.Html;
// HTML Body (remove HTML tags for plain text).
oMsg.Body = "Hello World!";
// ADD AN ATTACHMENT.
// TODO: Replace with path to attachment.
String sFile = @"C:\temp\Hello.txt";
MailAttachment oAttch = new MailAttachment(sFile, MailEncoding.Base64);
oMsg.Attachments.Add(oAttch);
// TODO: Replace with the name of your remote SMTP server.
SmtpMail.SmtpServer = "MySMTPServer";
SmtpMail.Send(oMsg);
oMsg = null;
oAttch = null;
}
catch (Exception e)
{
Console.WriteLine("{0} Exception caught.", e);
}
}
}
}
//Modify the code where you see "TODO".
Hope this will help you :)
prajwal kpPosted Dec 23, 2010, 3:06 AM
Krishna GaradPosted Dec 23, 2010, 2:30 AM
Manikavelu VelayuthamPosted Dec 23, 2010, 2:24 AM