INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

asp email question...

asp email question...

(OP)
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

RE: asp email question...

(OP)
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>www.XXXXXXX.com/XXXXXXX</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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close