Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp email question...

Status
Not open for further replies.

jared5494

Technical User
Jun 9, 2002
111
US
Hello,
I am very new to .ASP pages and using them. Here is what i am trying to do: When a user subscribes to a service, i want to email them their username/password, etc. The variables i will be using (from the signup) will be

sFirstName, sLastName, sEmail, sReferral

here is the code i have so far to email. Please check the subject line and the body... should i keep the variables in parenthensies? see below:

<%
Dim objCDOMail 'Holds the CDONTS NewMail Object

Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

objCDOMail.From = "DoNotReply@datahealthusa.com"

objCDOMail.To = sEmail

objCDOMail.Subject = "Thank you for registering sFirst sLast!"

objCDOMail.Body = "Your username = sUserName <br> Your password = sPassword"

objCDOMail.Send

Set objCDOMail = Nothing
%>

so there it is... is that the correct way of doing it? i very much appreciate you looking at this and any information you can give me.

Thanks again,
Jared
 
ignore the post above... below is the finalized version. the very beginning if statement and the sReferral have already been declared.. I appreciate if you can help me further with this by checking to make sure the syntax is correct and all that good stuff. all the variables have been declared. thanks in advance:

if sReferral = NIS Then
'Dimension variables
Dim objCDOMail 'Holds the CDONTS NewMail Object

'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

'Who the e-mail is from
objCDOMail.From = "DoNotReply@xxxxx.com"

'Who the e-mail is sent to
objCDOMail.To = sEmail

'Set the subject of the e-mail
objCDOMail.Subject = "Thank you for registering with XXXXX XXXXX"

'Set the main body of the e-mail
objCDOMail.Body = "Dear" & sfirst & slast &";,
<p>Welcome and thank you for choosing XXXXX. You are registered under the following User Name and Password:</p>
<p>User Name: " & sUserName & "<br>
Password: " & sPassword & "</p>
<p>Please save this email for future reference.</p>
<p>----------------------------<br>
Download the eBackUp Install<br>
----------------------------<br>
If you have not already downloaded and installed the XXXXXX software, you can do so by pointing your Internet browser to the following download site:</p>
<p><p>Please note the download is approximately 10 MB.</p>
<p>---------------------------------------------<br>
Need help installing and configuring XXXXXXX?<br>
---------------------------------------------<br>
XXXXXX is proudly supported by a dedicated technical support team trained to ensure that you enjoy the highest quality service possible. As an integral part of XXXXXX XXXXXXX XXXXX, top notch support is given to all our customers. </p>
<p>Please call XXXXXXXX and speak with an XXXXXX support technician. Our qualified support staff is available to take your calls from 6:00 a.m. to 7:00 p.m. MST Monday-Thursday and 6:00 a.m. to 5:00 p.m. MST on Friday.</p>
<p>------------------------------------------------<br>
NEW Feature Announcement &ndash; Backup Log Monitoring<br>
------------------------------------------------<br>
Monitoring your backup logs is essential to securing a current backup of your data. This can detract from your important task of offering great service to your patients. With XXXXXX Log Monitoring, the XXXXXX support team will monitor your logs and notify you if any errors occur. You will have priceless confidence that your data is being successfully backed up every time.</p>
<p>To learn more about the XXXXX Log Monitoring service or to register please call XXXXXX to speak with an XXXXXXX Sales Specialist.</p>
<p>Thank you again for choosing XXXXXX to safeguard your data.</p>
<p>XXXXXXXX<br>
Director of eServices<br>
</p>"

'Send the e-mail
objCDOMail.Send

'Close the server object
Set objCDOMail = Nothing
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top