473,837 Members | 1,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sending email from asp page???

46 New Member
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=CreateOb ject("CDO.Messa ge")
myMail.Subject= "Sending email with CDO"
myMail.From="my mail@mydomain.c om"
myMail.To="some one@somedomain. com"
myMail.TextBody ="This is a message."
myMail.Configur ation.Fields.It em _
("http://schemas.microso ft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configur ation.Fields.It em _
("http://schemas.microso ft.com/cdo/configuration/smtpserver") _
="smtp.server.c om"
'Server port
myMail.Configur ation.Fields.It em _
("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) _
=25
myMail.Configur ation.Fields.Up date
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.C reateHTML 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 1489
simplesoftsolutions
5 New Member
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
simplesoftsolut ions.com
May 18 '07 #2
chaitanya02
46 New Member
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
simplesoftsolut ions.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...."My LongMessage" along with www.google.com, somewhere inside the MyLongmessage.. .Is it possible???

Thanks
Tanya
May 18 '07 #3
chaitanya02
46 New Member
=============== ============


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...."My LongMessage" 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
1914
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 subject and body). The BCC of all these emails that I sent to myself were fine. When I send email manually to these 5 recipients they receive it well. I have pasted my code below. Can someone give me a clue as why this could be happening? Is...
1
2770
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, there's a contact for that collects a few lines of info, and when you hit submit, it takes that and sends it to a specifie email address. It's been working all this time, but recently we just bought and implemented exchange 2003 on the server and...
3
6838
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 (non-MyDomain.com address) I get the following error: The server rejected one or more recipient addresses. The server response was: 550 You must check your mail from this IP or SMTP Auth before sending to BSmith@Juno.com Here's the FULL...
6
2426
by: Eduardo Rosa | last post by:
Somebody knows how I queue email using .Net? thanks a lot
1
8189
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 the members of my organization. I think my problem is incorrectly setting the settings on my server or an authentication problem. Here is the code I have written to send a test message: -----Code Begins: Sensitive Information Replaced by -----...
4
5057
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. Posted Via Usenet.com Premium Usenet Newsgroup Services
3
4284
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 from my PC, everything seems right, but when I publish the website, and send it to my real website, everything works but the mail sending. I have red some groups and topics, and everywhere I can found: - Use the following syntax: <system.net>
8
3813
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: Final-Recipient: XXXXXXX@page.nextel.com Diagnostic-Code: smtp; 554 message body contains illegal bare CR/LF characters. Action: failed Status: 5.0.0
8
2921
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 Submit it would send email. But then I wanted to give a user an opportunity to go back and edit the entries if incorrect before submitting. I separted the codes into two pages. On the second page when Submit button is clicked it should send email. But...
1
1798
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Email Newsletter</title>
0
10867
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10617
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10263
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6989
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5666
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4469
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4036
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3122
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.