List Info

Thread: Send Email In ASP.NET




Send Email In ASP.NET
user name
2006-05-16 19:14:56
hi,
I wanna send an email using asp.net but I want the email to be authenticated from my account and don't reported as spam (e.g. through logging to my account using username and password or something like that)
regards
Send Email In ASP.NET
user name
2006-05-16 19:34:01
Hope it helps.
Replace various variables with strings and you should be good to go.


          ;      MailAddress from = new MailAddress(emailaddress, name);
        ;        MailAddress to = new MailAddress(emailaddress, name);
        ;        MailMessage message = new MailMessage(from, to);
 ;           ;    message.Subject += subject;
    ;           ; message.Body += body;
          ;      SmtpClient smtp = new SmtpClient(smtpserver);
       ;         smtp.Credentials = new NetworkCredential(username,password);
 ;           ;    try
   ;           ;  {
       ;           ;  smtp.Send(message);
    ;           ;     message.Dispose();
      ;          }


Mohamed Nabil <Mohammed.Nabilgmail.com&gt; wrote:
hi,
I wanna send an email using asp.net but I want the email to be authenticated from my account and don't reported as spam (e.g. through logging to my account using username and password or something like that)
regards




My status
Skype ID: cochris4
Skype is a free secure and encrypted IM and VOIP client.
Download Skype at http://www.skype.com/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Send Email In ASP.NET
user name
2006-05-17 07:13:56
Dear Chris,
I think that this code is Compatible with ASP.NET 2 while I am using ASP.NET 1.1

 ;
On 5/16/06, Chris <yahoo.com">cochris4yahoo.com> wrote:
This is what I use.
Hope it helps.
Replace various variables with strings and you should be good to go.


&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  MailAddress from = new MailAddress(emailaddress, name);
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;  MailAddress to = new MailAddress(emailaddress, name);
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;  MailMessage message = new MailMessage(from, to);
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  message.Subject += subject;
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; message.Body += body;
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  SmtpClient smtp = new SmtpClient(smtpserver);
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   smtp.Credentials = new NetworkCredential(username,password);
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  try
   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;  {
 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;  smtp.Send(message);
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; message.Dispose();

 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; }


Mohamed Nabil <gmail.com" target="_blank">Mohammed.Nabilgmail.com > wrote:
hi,
I wanna send an email using asp.net but I want the email to be authenticated from my account and don't reported as spam ( e.g. through logging to my account using username and password or something like that)
regards




My status
Skype ID: cochris4
Skype is a free secure and encrypted IM and VOIP client.
Download Skype at http://www.skype.com/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


YAHOO! GROUPS LINKS




[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )