473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

sending email from asp page???

Hi All,,

I used this code to send an email to anyone, from my asp page, which accepts email address from the users of the form:

Sending a text e-mail using a remote server:

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="smtp.server.com"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
%>
================================================== ===

Now in the place of this line: myMail.TextBody="This is a message."

I want to customize a long text data ...instaed of just using "This is a message"....

Please suggest me on this. I tried using::myMail.CreateHTML Body:"...the long text". But it gives an error saying- asp page contains more than one html body, etc...


Please suggest me what I can do about this...All I want to do is to customize and send a message that I want to, instead of just using"This is a message" , in the email.
May 18 '07 #1
3 1462
I'm not sure if I understand your question properly.. But if you wish to send a more complete message, simply dim a var with your message and assign it to TextBody. For instance:

Dim MyLongMessage
MyLongMessage = "This is a long message to sends out a marketing email. It's very long... I talk about a lot of stuff here."

myMail.TextBody = MyLongMessage

Is that what you're looking for?

Anthony
simplesoftsolutions.com
May 18 '07 #2
I'm not sure if I understand your question properly.. But if you wish to send a more complete message, simply dim a var with your message and assign it to TextBody. For instance:

Dim MyLongMessage
MyLongMessage = "This is a long message to sends out a marketing email. It's very long... I talk about a lot of stuff here."

myMail.TextBody = MyLongMessage

Is that what you're looking for?

Anthony
simplesoftsolutions.com
===========================


Dear Anthony,

Thanks for the reply first of all!!!

I think it is close to what I am looking for..

But can I add one more question into this? I want - MyLongMessage to be displayed as you said, but can I add a URL into this MyLongMessage, which varies with one and another email address that I enter in the form?
----------------Scenario is something like this----------

DB Record 1: me@mydomain.com www.google.com

In the asp form- I enter me@mydomain.com.....click on submit- it will send me an email ....which includes...."MyLongMessage" along with www.google.com, somewhere inside the MyLongmessage...Is it possible???

Thanks
Tanya
May 18 '07 #3
===========================


Dear Anthony,

Thanks for the reply first of all!!!

I think it is close to what I am looking for..

But can I add one more question into this? I want - MyLongMessage to be displayed as you said, but can I add a URL into this MyLongMessage, which varies with one and another email address that I enter in the form?
----------------Scenario is something like this----------

DB Record 1: me@mydomain.com www.google.com

In the asp form- I enter me@mydomain.com.....click on submit- it will send me an email ....which includes...."MyLongMessage" along with www.google.com, somewhere inside the MyLongmessage...Is it possible???

Thanks
Tanya
===============================================

Anyone familiar with such scenario ,please suggest me on this...Thanks for your time!!

-Tanya
May 18 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joe | last post by:
Hi, I am sending an email from an asp page. Besides sending an email to sender, I am sending myself a BCC also. Out of 100 emails sent, about 5 recipients received a blank email (no text in...
1
by: festivalman | last post by:
Hi, sorry if this is in the wrong spot. Finding the newsgroups on MS's site could have been easier Here's my problem I've got some old asp's that are running our simple web site. In a section,...
3
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address...
6
by: Eduardo Rosa | last post by:
Somebody knows how I queue email using .Net? thanks a lot
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
4
by: Roger Withnell | last post by:
I'm sending Russian text in an email generated from the website which displays in the email as ?????????? The website is set to codepage 65001 and the charset to utf-8. Please advise. ...
3
by: armando perez | last post by:
Hi, this is my first time here, but I was looking for something that may help me, and still, I haven't found something to use. I'm using a website made in .NET with C#, when I'm running my site...
8
by: Marty | last post by:
I'm having issues sending an email to an "@page.nextel.com" email address. I can send to any other email address fine, but when I try the page.nextel.com it gives me this error: ...
8
by: nargis2009 | last post by:
Hi, I have been encountering problems with my web page which is supposed to send email, and wondered if anybody can help find error. Initially I had all codes in one page and on click of...
1
by: runway27 | last post by:
<?php $headers = "Content-type: text/html; charset=iso-8859-1"; $to="myemailaddress"; $subject="Email Newsletter"; $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.