• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 791
  • Last Modified:

Sending email via remote smtp (asp.net C sharp)

Dear Experts,

I wish to send a confirmation email from a ASP.net C sharp page to users via a remote smtp server as there is no local server in place. How can i send my log-in information, user/pwd, to the remote server to allow the connection and then send the email?

Thank you!
0
henrym01
Asked:
henrym01
  • 2
1 Solution
 
gregoryyoungCommented:
MailMessage mail = new MailMessage();
mail.To = to;
mail.From = from;
mail.Subject = "whatever";
mail.Body = "test";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(mail);

with this you can do it (setup your machine to redirect)

or check out this

http://www.codeproject.com/csharp/mailclient.asp
0
 
AgariciCommented:
you can not send mails using remote servers using framework classes.
try this library: http://www.lumisoft.ee/lsWWW/ENG/Products/Mail_Server/mail_index_eng.aspx?type=download

it is written in c# it is free and you can use remote servers.

hth,
A.
0
 
gregoryyoungCommented:
"you can not send mails using remote servers using framework classes."

ummm this is wrong ... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmailsmtpmailclasssmtpservertopic.asp

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now