Results 1 to 5 of 5

Thread: URL in Email *RESOLVED*

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    URL in Email *RESOLVED*

    I've got a registration page on my site that's working fine and once the user fills in all the info an email is sent to them with a link which they need to click on to activate their account.

    What i'm trying to do is have the link within the email to be displayed like on a webpage. eg. Click Here.
    Click Here

    I've tried the below but it sends exactly what i've posted and not a link that says Activate Account. Can this be done?

    PHP Code:
    <a href="http://www.mysite.com/ebook/index.php?substr=registration&ufname=Tiger&ulname=Woods&[email protected]&uicq=&uwsite=&uname=Tiger&upass=Woods">Active Account</a
    Last edited by lintz; Jul 15th, 2004 at 06:39 PM.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    You need to send a content type header in your email like the following:
    PHP Code:
    mail ($to$subject$message"MIME-Version: 1.0\r\nContent-Type: text/html"); 
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697
    Thanks visualAd.

    I've now got the below which works but i've had to remove ""From: [email protected]" from the mail() code. Is there a way I can add it in as well as the headers code i've added?

    PHP Code:
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    mail($uemail"ShareFinder E-Book - Confirmation Email"$body$headers); 

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Just add it to the list of headers:
    PHP Code:
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "From: [email][email protected][/email]"

    mail($uemail"ShareFinder E-Book - Confirmation Email"$body$headers); 
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697
    Thanks again visualAd, it now works the way i wanted

Posting Permissions

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



Click Here to Expand Forum to Full Width