Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in ASP .NET only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
ASP .NET
Email
Email
Collapse
This topic is closed.
X
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
JMMB
#1
Email
Nov 17 '05, 08:51 PM
what would be the best technology to send emails in a ASP.NET Application?
I used to use CDONTS with ASP.
thanks,
Frank Drebin
#2
Nov 17 '05, 08:51 PM
Re: Email
Well, here is the lazy answer (this is what I ended up doing). Include
CDONTS (the COM object) in your references.. and use it like this:
CDONTS.NewMailC lass objMail = new CDONTS.NewMailC lass();
string SendFrom = Request.Form["From"] + " <" + Request.Form["FromEmail"] +
">";
string SendTo ="Frank Drebin <someemail@some email.com>";
string From = Request.Form["From"];
string FromEmail = Request.Form["FromEmail"];
string Subject = Request.Form["Subject"];
string Msg = Request.Form["Msg"].Replace("\n"," <br>"); // Replace carriage
returns with line breaks
string BodyText = "";
BodyText += "<STYLE> .MsgTxt { font-family:Verdana, Arial; font-size: 10pt;
font-style: normal; line-height: normal;font-weight: normal} </STYLE>";
BodyText += "<ul>";
BodyText += "<table width=\"100%\"> \n";
BodyText += "<tr><td class=MsgTxt>Fr om:</td><td class=MsgTxt><b >" + From + "
(<a href=mailto:" + FromEmail + ">" + FromEmail + "</a>)</b></td>\n";
BodyText += "<tr><td class=MsgTxt>Se nt:</td><td class=MsgTxt><b >" +
DateTime.Now.To String() + "</b></td>\n";
BodyText += "<tr><td class=MsgTxt>Su bject:</td><td class=MsgTxt><b >" +
Subject + "</b></td>\n";
BodyText += "</table><hr>\n";
BodyText += Msg + '\n';
BodyText += "-----\n";
BodyText += "</ul>";
objMail.BodyFor mat = 0;
objMail.MailFor mat = 0;
objMail.Send(Se ndFrom,SendTo, Subject, BodyText, 1);
"JMMB" <mbarbieri@bf.c om.br> wrote in message
news:%23IlgIFpZ DHA.1580@tk2msf tngp13.phx.gbl. ..[color=blue]
> what would be the best technology to send emails in a ASP.NET Application?
> I used to use CDONTS with ASP.
>
> thanks,
>
>[/color]
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment