alege limba::
HOME
NEWS
ABOUT US
F.A.Q.
JOBS
CONTACT
  


 
 
webdesign e-commerce online backup
       F.A.Q.

  1. How can I send an email in ASP?
  2. How can I send an email in PHP?
  3. How can I send an email in ASP.NET?

How can I send an email in ASP?

<%


Set myMail = Server.CreateObject("CDO.Message")

Set config = Server.CreateObject("CDO.Configuration")
Set Flds = config.Fields
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver")="localhost"

Set myMail.Configuration = config

myMail.From = "the sender email"
myMail.To = "the recipient email"
myMail.CC = "the CC email"
myMail.BCC = "the BCC email"
myMail.Subject = "the email subject"

myMail.HTMLBody = "the text/html portion of message body"
myMail.TextBody = "the text/plain portion of message body"

myMail.Send
Set myMail = nothing

%>

  sus

How can I send an email in PHP?

<?

$message = new COM("CDO.Message");

$config = new COM("CDO.Configuration");
$config->Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"]->value=2;
$config->Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"]->value="localhost"; $config->Fields->Update();

$message->Configuration = $config;

$message->To = "the recipient email";
$message->CC = "the CC email";
$message->BCC = "the BCC email";
$message->From = "the sender email";
$message->Subject = "the email subject";

$message->HTMLBody ="the text/html portion of message body";
$message->TextBody ="the text/plain portion of message body";

$message->Send();

?>

  sus

How can I send an email in ASP.NET?

  • VB.NET

Dim objMail As New System.Web.Mail.MailMessage
With objMail
.From = "the sender email"
.To = "the recipient email"
.Cc = "the CC email"
.Bcc = "the BCC email"

.BodyFormat = Mail.MailFormat.Html 'this is a text/html format

or


.BodyFormat = Mail.MailFormat.Text 'this is a text/plain format
.Subject = "the email subject"
.Body = "the email body"
End With

System.Web.Mail.SmtpMail.SmtpServer = "localhost"
System.Web.Mail.SmtpMail.Send(objMail)

  • C#

System.Web.Mail.MailMessage objMail = new System.Web.Mail.MailMessage();

objMail.From = "the sender email";
objMail.To = "the recipient email";
objMail.Cc = "the CC email";
objMail.Bcc = "the BCC email";

objMail.BodyFormat = Mail.MailFormat.Html; 'this is a text/html format

or


objMail.BodyFormat = Mail.MailFormat.Text; 'this is a text/plain format
objMail.Subject = "the_email subject";
objMail.Body = "the email body";

System.Web.Mail.SmtpMail.SmtpServer = "localhost";
System.Web.Mail.SmtpMail.Send(objMail);

  sus


Your question:

home | news | about us | jobs | contact
webdesign | dionshop | online backup

Copyright © 2005 Dion. All rights reserved.