ASPMail question

Results 1 to 2 of 2

Thread: ASPMail question

  1. #1
    minnie Guest

    Default ASPMail question

    I have registered smtpsvg.dll and when I send email from the asp page there is no any error but I don&#039t get the email.<BR><BR>what is the problem does anyone know ?<BR><BR>If I want to download ASPMail3.0 again is there any place where I can get it for free? <BR>Here is my code for creating the object. <BR>&#060;%<BR>Set Mailer=Server.CreateObject("SMTPsvg.Mailer")<BR>Se t Session("AspMailObject")=Mailer<BR>Session("Remote Host")="my mail server&#039s ip adddress"<BR>%&#062;<BR><BR>Why am I not receiving any eamils ? Please Help me!

  2. #2
    Kevitt Guest

    Default RE: ASPMail question

    Hmmm. Why create the object at the session level?<BR>Here is an example of some code that works for me. It takes the info from a request form, but maybe this will help.<BR><BR>&#060;%@ Language=VBScript %&#062;<BR>&#060;%Option Explicit%&#062;<BR>&#060;%Response.Buffer=True%&#0 62;<BR><BR>&#060;% &#039DECLARE YOUR VARIABLES<BR>Dim strTo, strSubject, strBody, strfullName, strCountry, strPhone, strEmail, strUsername, strPwd1, strPwd2<BR>Dim Mailer &#039The Mail object<BR><BR><BR><BR>&#039 THIS STUFF READS IN FORM VALUES FROM A PREVIOUS PAGE<BR>strSubject = "Subject of Email"<BR>strFullName = Request("fullName")<BR>strCountry = Request("Country")<BR>strPhone = Request("Phone")<BR>strEmail = Request("Email")<BR>strUsername = Request("userName")<BR>strPwd1 = Request("pwd1")<BR>strPwd2 = Request("pwd2")<BR><BR>&#039 THE MESSAGE BODY CAN BE BUILT THIS WAY<BR>strBody = strBody & vbCrLf <BR>strBody = strBody & "SOME BODY TEXT" & vbCrLf<BR>strBody = strBody & "MORE TEXT" & vbCrLf & vbCrLf<BR><BR>strBody = strBody & "Full Name: " & strfullName & vbCrLf<BR>strBody = strBody & "Lives in: " & strCountry & vbCrLf<BR>strBody = strBody & "Telephone: " & strPhone & vbCrLf<BR>strBody = strBody & "Email: " & strEmail & vbCrLf<BR>strBody = strBody & "Requested UserName: " & struserName & vbCrLf<BR>strBody = strBody & "Requested Password: " & strpwd1 & vbCrLf<BR>strBody = strBody & vbCrLf & vbCrLf & vbCrLf<BR><BR>&#039 CREATE AN INSTANCE OF THE MAIL OBJECT. EXPERIMENT USING ONLY THE CODE FROM HERE DOWN, SETTING ALL PROPERTIES BELOW.<BR><BR> Set Mailer = Server.CreateObject("SMTPsvg.Mailer")<BR> <BR> &#039 SET THE PROPERTIES OF THE MAIL OBJECT<BR> Mailer.FromName = "John Q. Public"<BR> Mailer.FromAddress = "Some email address"<BR> Mailer.RemoteHost = ""<BR> Mailer.AddRecipient "Recipient Name", "their@email.addr"<BR> Mailer.Subject = strSubject<BR> Mailer.BodyText = strBody<BR> <BR> &#039 SEND THE MESSAGE & SEE IF IT WAS SUCCESSFUL<BR> IF Mailer.SendMail THEN<BR> ELSE<BR>Response.Write "Mail failure. Error code: " & Mailer.Response<BR>End if %&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts