Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASP Mailer Question

    I have created a form that is going to an Access database. The form variables also need to go to an email. I got the fields to display in the database correctly, but cannot get them to come through on the asp mailer. The mailer code is on the thank you page and I'm calling the form field variables correctly, I think. When the email comes through, the information in "" comes across, but the form variables do not. Here is an example of the code:
    " " & vbcrlf &_
    " Club Name: " & ClubName0 & vbcrlf &_

    Does anyone know what usually causes the variables to not show up on the email? Thank you!

  • #2
    Regular Coder
    Join Date
    Jan 2005
    Posts
    155
    Thanks
    0
    Thanked 0 Times in 0 Posts
    there's nothing in the variables.

    show all the code that builds the email and we'd be in a better position to assist you.

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is the code I'm using. It's located on the thank you page of my form.

    <%


    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    Mailer.FromName = Request.Form("firstname0")
    Mailer.FromAddress = "leslie.nicholson@clubcorp.com"
    Mailer.ReplyTo = Request.Form("emailaddress0")
    Mailer.RemoteHost = "64.251.192.200"

    Mailer.AddRecipient "Leadership Summit","leslie.nicholson@clubcorp.com"
    Mailer.Subject = "Leadership Summit Registration 2007"
    Mailer.BodyText = "Leadership Summit 2007" & vbcrlf &_


    " " & vbcrlf &_
    " Club Name: " & ClubName0 & vbcrlf &_
    " Email Address: " & EmailAddress0 & vbcrlf &_
    " Hire Date: " & HireDate0 & vbcrlf &_
    " First Name: " & FirstName0 & vbcrlf &_
    " Last Name: " & LastName0 & vbcrlf &_
    " Name Tag: " & NameTag0 & vbcrlf &_
    " Spouse / Guest Name: " & Spouse_Name0 & vbcrlf &_
    " Club Phone: " & ClubPhone0 & vbcrlf &_
    " Cell Phone: " & CellPhone0 & vbcrlf &_
    " Club Address 1: " & ClubAddress3 & vbcrlf &_
    " Club Address 2: " & ClubAddress4 & vbcrlf &_
    " City: " & City0 & vbcrlf &_
    " State: " & ClubState0 & vbcrlf &_
    " Zip: " & ClubZip0 & vbcrlf &_
    " " & vbcrlf &_
    " Employee Travel Information" & vbcrlf &_
    " Flying / Driving: " & FlyingDriving0 & vbcrlf &_
    " Airline: " & Airline0 & vbcrlf &_
    " Departure City: " & DepartureCity0 & vbcrlf &_
    " Arrival Date: " & ArrivalDate0 & vbcrlf &_
    " Arrival Time: " & ArrivalTime0 & vbcrlf &_
    " Departure Date: " & DepartureDate0 & vbcrlf &_
    " Departure Time: " & DepartureTime0 & vbcrlf &_
    " Use LaCosta Transportation: " & LaCostaTransportation & vbcrlf &_
    " Seating Preference: " & SeatingPreference0 & vbcrlf &_
    " Frequent Flyer Number: " & FrequentFlyerNumber0 & vbcrlf &_
    " Roommate: " & Roommate0 & vbcrlf &_
    " Room Configuration: " & RoomConfiguration0 & vbcrlf &_
    " Smoking Option: " & SmokingOption0 & vbcrlf &_
    " Dietary Restrictions: " & DietaryRestrictions0 & vbcrlf &_
    " Special Requests: " & SpecialRequests0 & vbcrlf &_
    " Will participate in golf: " & ThursdayGolfEmployee & vbcrlf &_
    " Handicap Index: " & HandicapIndex0 & vbcrlf &_
    " Rental Clubs: " & RentalClubs0 & vbcrlf &_
    " Questions for Executives: " & QuestionsForExecutives0 & vbcrlf &_
    " Digtial Photo: " & Employee_Photo0 & vbcrlf &_
    " " & vbcrlf &_
    " Spouse / Guest Registration" & vbcrlf &_
    " Representing Club: " & SpouseClub0 & vbcrlf &_
    " First Name: " & SpouseFirstName0 & vbcrlf &_
    " Last Name: " & SpouseLastName0 & vbcrlf &_
    " Name Tag: " & SpouseNameTag0 & vbcrlf &_
    " " & vbcrlf &_
    " Spouse / Guest Travel Information" & vbcrlf &_
    " Flying / Driving: " & SpouseFlyingDriving0 & vbcrlf &_
    " Airline: " & SpouseAirline0 & vbcrlf &_
    " Departure City: " & SpouseDepartureCity0 & vbcrlf &_
    " Arrival Date: " & SpouseArrivalDate0 & vbcrlf &_
    " Arrival Time: " & SpouseArrivalTime0 & vbcrlf &_
    " Departure Date: " & SpouseDepartureDate0 & vbcrlf &_
    " Departure Time: " & SpouseDepartureTime0 & vbcrlf &_
    " Use LaCosta Transportation: " & SpouseLaCostaTransportation & vbcrlf &_
    " Seating Preference: " & SpouseSeatingPreference0 & vbcrlf &_
    " Frequent Flyer Number: " & SpouseFrequentFlyerNumber0 & vbcrlf &_
    " Roommate: " & SpouseRoommate0 & vbcrlf &_
    " Dietary Restrictions: " & SpouseDietaryRestrictions0 & vbcrlf &_
    " Speical Requests: " & SpouseSpecialRequests0 & vbcrlf &_
    " Will participate in golf: " & ThursdayGolfSpouse & vbcrlf &_
    " Handicap Index: " & SpouseHandicapIndex0 & vbcrlf &_
    " Rental Clubs: " & SpouseRentalClubs0 & vbcrlf

    if Mailer.SendMail then
    Response.Write ""
    else
    Response.Write "Mail send failure. Error was " & Mailer.Response
    end if
    Set Mailer = Nothing

    %>

  • #4
    Regular Coder
    Join Date
    Jan 2005
    Posts
    155
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is the code for inserting into the database on the same page?

  • #5
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, the mailer is on the thank you page - but I've tried it on both the form and thank you page and neither work. What is so weird is that he information in quotes comes through on the mailer, so I know the process is working. It's just not grabbing the variables and pulling them into the email.

  • #6
    Regular Coder
    Join Date
    Jan 2005
    Posts
    155
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by cloe View Post
    No, the mailer is on the thank you page - but I've tried it on both the form and thank you page and neither work. What is so weird is that he information in quotes comes through on the mailer, so I know the process is working. It's just not grabbing the variables and pulling them into the email.
    it's because once the data is inserted and it goes to the mailer page, the variables are empty. when the user submits the form it goes to the thank you page where i'm assuming you do something like this:
    Code:
    variable_name = request.Form("textbox_name")
    when you go to the mailer page variable_name would be empty.

    i would suggest that you put the mailer code on the same page you use to insert into the database. if that still doesn't work, then you need to post that code along with any error messages you get.


  •  

    Posting Permissions

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