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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Mailing list unsubscribe as linked text?

    I am trying to get it so that when I send a eMail out to my subscribers through my php mailing list; there will be an unsubscribe link. Currently I am doing so by using

    PHP Code:
    $unSub "Unsubscribe: http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}";

    $body "Greetings, $upperUser\n\n{$message}\n\n${unSub}"
    Which works but its result is messy. Is there a way that I can make it so the text "Unsubscribe" is linked to http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}

    I've tried
    PHP Code:
    $unSub "<a href="http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}"Unsubscribe</a>" 
    but can't seem to get that to work. Is there something I am doing wrong with this syntax?

  • #2
    New Coder
    Join Date
    Apr 2012
    Posts
    23
    Thanks
    3
    Thanked 1 Time in 1 Post
    Quote Originally Posted by constantgamer24 View Post
    I've tried
    PHP Code:
    $unSub "<a href="http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}"Unsubscribe</a>" 
    but can't seem to get that to work. Is there something I am doing wrong with this syntax?
    you will need backslashes around the href, like:
    PHP Code:
    $unSub "<a href=\"http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}\">Unsubscribe</a>" 
    (You also missed an ">" )

  • Users who have thanked chunky for this post:

    constantgamer24 (06-06-2012)

  • #3
    New to the CF scene
    Join Date
    May 2012
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thank you very much. I missed that >


  •  

    Tags for this Thread

    Posting Permissions

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