kimeee Posted June 7, 2006 Share Posted June 7, 2006 I have set up an autoresponder. In the autorespond message, I'd like to add a link, either to another page or to a mailto: link so we know they received the email. Below is the code I have for the message. Can someone tell me what I'm doing wrong?----------------------------------------------------////// Now we are ready to send the email so we call php's mail() function//////with the appropriate variables from above included in the brackets//////////// Auto-Responder////// You can substitute any of form fields in response by using////// %field_name% in response text.//////$autoresponder_enabled = 1;$autoresponder_from = $send_to;$autoresponder_subject = $subject;$autoresponder_message = <<<MSGHi %nominatorName_req%,\nThank you for your nomination. \nPlease recheck your submitted information and reply to this message to complete the nomination process for the 2007-2010 Nominations.\n----------Nominee Information------------\nNominee Name: %nomineeName_req%\nNominee Institution: %nomineeInstitution_req%\nNominee Department: %nomineeDept_req%\nNominee Field of Study: %nomineeField_req%\nIf Other: %nomineeOtherField%\nNominee Date of PhD: %nomineePhd_req%\nNominee Address: %nomineeAddress_req%\nNominee Phone: %nomineePhone_req%\nNominee Email: %nomineeEmail_req%\n----------Nominator Information----------\nNominator Name: %nominatorName_req%\nNominee Title: %nominatorTitle_req%\nNominator Institution: %nominatorInstitution_req%\nNominator Department: %nominatorDept_req%\nNominator Address: %nominatorAddress_req%\nNominator Phone: %nominatorPhone_req%\nNominator Email: %nominatorEmail_req%.\n} ***here is where i'd like to put the link. i have deleted anything i tried hoping to not look less dumb***MSG; Quote Link to comment https://forums.phpfreaks.com/topic/11435-need-help-formatting-link-in-php/ Share on other sites More sharing options...
xyph Posted June 7, 2006 Share Posted June 7, 2006 I may be incorrect on this one (someone please correct me if so) but I think your email must be HTML formatted, rather than plain text... Though plain text hyperlinking does exist, it relys on the mail client to automatically parse the URL as a link. Quote Link to comment https://forums.phpfreaks.com/topic/11435-need-help-formatting-link-in-php/#findComment-42919 Share on other sites More sharing options...
ober Posted June 7, 2006 Share Posted June 7, 2006 It's as simple as adding in an HTML link to whatever page you want them to click on, but remember that they must click on it or you have to run some JavaScript that will make a call to your site. But most mail clients block JavaScript so you're stuck with making them click a link, and experience tells me that most people will ignore it.And xyph is correct... you need to use headers to set the email to HTML output to have the hyperlink work. (Read the mail() entry in the manual to find out how to set that up). Quote Link to comment https://forums.phpfreaks.com/topic/11435-need-help-formatting-link-in-php/#findComment-42920 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.