19 users online (0 members and 19 guests)  


  Results 1 to 4 of 4

Related

  1. reading data line by line from textarea    Forum: ASP Forum
    Replies: 3
  2. mailto auto subject population variable    Forum: HTML Forum
    Replies: 0
  3. Auto E-mail reply to form submission    Forum: ASP Forum
    Replies: 1
  1. #1
    Annie's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2008
    Posts
    2

    E-Mail Subject Line Auto Fill

    Hi,

    I'm building a site and have and e-mail response button. What I would like to know is when the button is clicked and it launches your default e-mail application and a new mail, it automatically enters the e-mail address I specify but is there a way of automatically entering specific text into the subject line?

    Many thanks

  2. #2
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: E-Mail Subject Line Auto Fill

    Code:
    <a href="mailto:email_address?subject=This is the subject line">Mail</a>
    Though it might work well, I suggest on using server-side for this (ASP, PHP, cgi, JSP, etc):
    http://us.php.net/mail
    http://email.about.com/cs/phpemailtips/qt/et031202.htm

    Hope that helps.
    Last edited by rangana; 11-07-2008 at 09:22 PM. Reason: Changed the code
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  3. #3
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: E-Mail Subject Line Auto Fill

    I don't think that the above code will work. The URL will only work if you are using server-side scripts, and then it will need to be altered anyway to remove the extra question mark. From your description, I assume you are using a mailto link.

    Use the following format:
    Code:
    <a href="mailto:YOUR_EMAIL_ADDRESS?subject=Comments from MailTo Syntax Page">
    For other information you can add in, look http://www.ianr.unl.edu/internet/mailto.html
    Last edited by HTML; 03-08-2012 at 04:43 PM.

  4. #4
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: E-Mail Subject Line Auto Fill

    Yes, for some reason, the email address inside the mailto was changed. I've edited it to depict that of the correct one.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.



Tags for this Thread