Re: [PHP] Cannot send a hyperlink (resent)
Scott Wilcox wrote: > I personally think many, many mail servers will block any mail with > X-Mailer containing PHP. Purely because there are an insane number of > chances that its going to be spam. No sane mailserver or mailserver admin will block an email purely based on an X-Mailer: header. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink (resent)
I personally think many, many mail servers will block any mail with X-Mailer containing PHP. Purely because there are an insane number of chances that its going to be spam. This is purely based on my opinion though, I'd expect others on the list to share it or be similar in viewpoint though. I'd personally not use that header. That is of course just my two cents though! Scott. tedd wrote: At 7:29 PM +0100 11/15/07, Per Jessen wrote: Brad wrote: Why is php refusing to parse as html? Here your code cut down to what you need: $headers = "From: \"".$fromname."\" <".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n"; $headers .= "Content-Transfer-Encoding: 8bit".$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); I've been told that using: $headers .= "X-Mailer: PHP ".phpversion().$eol; is a good way to get stuck in a spam filter -- what do you think? Cheers, tedd
RE: [PHP] Cannot send a hyperlink (resent)
tedd wrote: > I've been told that using: > > $headers .= "X-Mailer: PHP ".phpversion().$eol; > > is a good way to get stuck in a spam filter -- what do you think? It wouldn't get you stuck in our filters. Personally I never add an X-Mailer when generating emails with PHP or bash or whatever - what's the added value? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink (resent)
On Nov 16, 2007, at 9:15 AM, Scott Wilcox wrote: I personally think many, many mail servers will block any mail with X-Mailer containing PHP. Purely because there are an insane number of chances that its going to be spam. This is purely based on my opinion though, I'd expect others on the list to share it or be similar in viewpoint though. I'd personally not use that header. That is of course just my two cents though! Scott. Speaking as someone who runs a mail server, I don't specifically look for that kind of stuff... I have RBL lists, greylisting/delaying, Penalty Boxes, and a content scanner which I don't have active right now. I look more for forged helo's, and rbl failures to block my spam... Surprisingly, about 80 percent of my spam is simply blocked by greylisting... Easy and simple :) All you have to do to beat it, is try and resend the mail which mail servers do automatically anyway if they are setup right :) But that's just me... If you want some real info on it, I'd suggest the postfix mailing list. Lots of people on there, and lots of people at big companies there looking for stuff. -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink (resent)
2007. 11. 16, péntek keltezéssel 09.09-kor tedd ezt írta: > At 7:29 PM +0100 11/15/07, Per Jessen wrote: > >Brad wrote: > > > >> Why is php refusing to parse as html? > > > >Here your code cut down to what you need: > > > >$headers = "From: \"".$fromname."\" <".$fromaddress.">".$eol; > >$headers .= "X-Mailer: PHP ".phpversion().$eol; > >$headers .= "MIME-Version: 1.0\r\n"; > >$headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n"; > >$headers .= "Content-Transfer-Encoding: 8bit".$eol; > > > >$body = "http://www.zoneofsuccessclub.com\";>link \n"; > > > >mail($email, $subject, $body, $headers); > > I've been told that using: > > $headers .= "X-Mailer: PHP ".phpversion().$eol; > > is a good way to get stuck in a spam filter -- what do you think? I think there are spam filters out there which mark messages with X-Mailer: PHP as spam because many incorrectly coded php mail forms have been already abused by spammers... but also there are a lot of spam filters which mark messages without X-Mailer header as spam... so I tend to use a custom X-Mailer header for my applications, containing application name and version number and similar info greets Zoltán Németh > > Cheers, > > tedd > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink (resent)
On Nov 16, 2007 9:15 AM, Scott Wilcox <[EMAIL PROTECTED]> wrote: > I personally think many, many mail servers will block any mail with > X-Mailer containing PHP. Purely because there are an insane number of > chances that its going to be spam. > > This is purely based on my opinion though, I'd expect others on the list > to share it or be similar in viewpoint though. > > I'd personally not use that header. That is of course just my two cents > though! > > Scott. > > > tedd wrote: > > At 7:29 PM +0100 11/15/07, Per Jessen wrote: > >> Brad wrote: > >> > >>> Why is php refusing to parse as html? > >> > >> Here your code cut down to what you need: > >> > >> $headers = "From: \"".$fromname."\" <".$fromaddress.">".$eol; > >> $headers .= "X-Mailer: PHP ".phpversion().$eol; > >> $headers .= "MIME-Version: 1.0\r\n"; > >> $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n"; > >> $headers .= "Content-Transfer-Encoding: 8bit".$eol; > >> > >> $body = "http://www.zoneofsuccessclub.com\";>link \n"; > >> > >> mail($email, $subject, $body, $headers); > > > > I've been told that using: > > > > $headers .= "X-Mailer: PHP ".phpversion().$eol; > > > > is a good way to get stuck in a spam filter -- what do you think? > > > > Cheers, > > > > tedd > There are some SMTP servers that rely on the X-Mailer header to determine whether or not a message is SPAM, and can decide in either favor, in part, on that information. However, keep in mind that X-Mailer is also non-Internet standard. In fact, it's even listed in RFC 2076 (gotta' love the RFCs!) as such. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink (resent)
At 7:29 PM +0100 11/15/07, Per Jessen wrote: Brad wrote: Why is php refusing to parse as html? Here your code cut down to what you need: $headers = "From: \"".$fromname."\" <".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n"; $headers .= "Content-Transfer-Encoding: 8bit".$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); I've been told that using: $headers .= "X-Mailer: PHP ".phpversion().$eol; is a good way to get stuck in a spam filter -- what do you think? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink (resent)
Hi gang: I didn't catch it and I'm too lazy to look it up, but someone in this thread provided this reference: http://www.bath.ac.uk/bucs/email/anatomy.shtml There was a similar thread going on a different list and I was told: Or RFCs 2821 and 2822 (the URL above refers to RFC 822, which has been obsoleted by 2822 for about six years or so). Basing the construction of an email message on some guide on how to read message headers is likely to deliver non-optimal results. It's more detailed than I normally think, but it might be of use to someone here. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Daniel Brown wrote: On Nov 15, 2007 9:41 AM, Brad <[EMAIL PROTECTED]> wrote: Beginning with $headers .= "--".$htmlalt_mime_boundary.$eol; It starts to read it as text and not html?? Could this be a server side problem? Negative. It's client-side error E304, resulting from a null-pointer exception between the chair and keyboard. Usually abbreviated to PEBKAC if I'm not mistaken. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
My bad, You do not need command line access! I should have read more. I just need to get this puppy working is all. Php should be able to do this by it's self! -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 9:46 AM To: Brad Cc: 'Daniel Brown'; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: > Beginning with > $headers .= "--".$htmlalt_mime_boundary.$eol; > It starts to read it as text and not html?? > > Could this be a server side problem? > > $email = $_REQUEST['email'] ; > $fromaddress .= '[EMAIL PROTECTED]'; > $fromname .= 'Zone of success Club'; > $eol="\r\n"; > $headers = "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP ".phpversion().$eol; > $headers .= "--".$htmlalt_mime_boundary.$eol; > $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body = "http://www.zoneofsuccessclub.com\";>link \n"; > mail($email, $subject, $body, $headers); You should not have a mime boundary in your headers. Why not use PHPMailer? All this (apparently) complicated stuff is already implemented for you. Either that or spend a few days learning about the structure of emails by following the links Daniel Brown sent you a few emails ago. PHPMailer can be found here: http://phpmailer.sf.net/ -Stut -- http://stut.net/ > -Original Message- > From: Daniel Brown [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 14, 2007 11:09 AM > To: Brad > Cc: [EMAIL PROTECTED]; php-general@lists.php.net > Subject: Re: [PHP] Cannot send a hyperlink > > Brad, > > That code is a mess and highly incorrect, even at a novice level. > Let me give you a hand > > On Nov 14, 2007 10:31 AM, Brad <[EMAIL PROTECTED]> wrote: >> I implemented the proposed code, and emails are not being sent? >> >> Any suggestions? >> >> Here is the code >> >> > >> $email = $_REQUEST['email'] ; >> $eol="\r\n"; >> $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; >> $headers .= "X-Mailer: PHP ".phpversion().$eol; >> $msg .= "--".$htmlalt_mime_boundary.$eol; >> $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; >> $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; >> $body.='link '; >> $msg .= $body.$eol.$eol; >> mail($to, $subject, $msg, $headers); >> >> ?> > > [snip] > > 1.) You reference $to in the mail() function, but there is no $to > defined. Instead, either change $email to $to or vice-versa. > 2.) You don't need to start the first line of a variable off with > a .= --- this will append to an existing variable of the same name, if > it exists. > 3.) You change your quoting style where it's not necessary. All > $msg lines should be using double quotes in your code above. > 4.) 5.) You have things in the message body that should be in the headers. > 6.) You don't need to do a carriage return and newline in the > message body. A simple \n will suffice. > 7.) I'm not sure what you hoped to achieve with the > "'.www.domain.com.'" conglomerate, but don't. That makes PHP > think that the domain is some sort of internally-defined variable of > horrible construct. > 8.) You should use http:// prior to the FQDN. > > Taking hints from what appears to be your code, this is how it should > be: > $email = $_REQUEST['email'] ; > $eol="\r\n"; > $headers = "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eo
RE: [PHP] Cannot send a hyperlink
> No access to the server command line to install it! > And, I am into this guy too deep to switch technologies. For the next time > around, no problem, this time I am just trying to get php to do what it is > supposed to do. [sarcastic]Rough install.[/sarcastic] If you can write a php script, you can use PHPmailer http://phpmailer.sourceforge.net/tutorial.php#4 IsSMTP(); // telling the class to use SMTP $mail->Host = "smtp.example.com"; // SMTP server $mail->From = "[EMAIL PROTECTED]"; $mail->AddAddress("[EMAIL PROTECTED]"); $mail->Subject = "An HTML Message"; $mail->Body = "Hello, my friend! \n\n This message uses HTML entities!"; ?> _ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
RE: [PHP] Cannot send a hyperlink
Understand your syntax issue has nothing to do with the mail function its self. That was an Operator headspace Issue. Including links in email is not hard your entire email structure was BLOWN UP... For you to even submit that to php.net is useless. A. No one is going to post that. Because it has NOTHING to do with the actual Mail(); B. Your using an existing mail() structure described. Brad wrote: > Thank you so much! > > It worked like a champ first try! > I would have never seen that and have been looking everywhere on the net for > a working example! > > Funny thing is, right after is work perfectly twice, my database crashed! > > But, this is the technology we play with! > > Problem solved and I am going to post this code on the php website for > others to reference! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Brad wrote: No access to the server command line to install it! And, I am into this guy too deep to switch technologies. For the next time around, no problem, this time I am just trying to get php to do what it is supposed to do. You don't need command line access to install it. PHPMailer consists of PHP only - nothing to install but PHP files. See here: http://phpmailer.sourceforge.net/install.php The suggestion of mime was presented to me from another kind sole trying to help that knows more than I and recommended on other help files. Why is php refusing to parse as html? And here lies the basic problem. PHP is *not* the thing that's refusing to parse it as HTML. Since you don't know that you really should do a lot of reading before you try sending HTML emails without using something like PHPMailer. For beeps and farts I've "fixed" your code, but even though it will now "work" it is nowhere near the right way to send this type of email, but my life is probably going to be too short to tell you what you could easily find out yourself. $email = $_REQUEST['email']; $fromaddress = '[EMAIL PROTECTED]'; $fromname = 'Zone of success Club'; $eol = "\r\n"; $headers = 'From: '.$fromname.' <'.$fromaddress.'>'.$eol; $headers .= 'Reply-To: '.$fromname.' <'.$fromaddress.'>'.$eol; $headers .= 'Return-Path: '.$fromname.' <'.$fromaddress.'>'.$eol; $headers .= 'X-Mailer: PHP '.phpversion().$eol; $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol; $headers .= 'Content-Transfer-Encoding: 8bit'; $subject = 'This is my spam, worship me'; $body = 'http://www.zoneofsuccessclub.com/";>link'; mail($email, $subject, $body, $headers); Some *important* notes... * I defined $subject because it tries to use it. * You don't need to provide the MessageID - your mail server will do that for you... correctly. * You don't need to add two carriage returns at the end of the headers - PHP will do that for you. * This email will be in HTML only which makes it a lot more likely to get flagged as spam. * If you're on a unix-based platform you really should be using the 5th parameter to mail, but that's probably going to confuse the hell out of you so I won't mention it. D'oh! * This code is not secure. It's trivial to inject headers (and a body too) into the message. You should be validating that $_REQUEST['email'] is a valid email address and just a valid email address. -Stut -- http://stut.net/ -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 9:46 AM To: Brad Cc: 'Daniel Brown'; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: Beginning with $headers .= "--".$htmlalt_mime_boundary.$eol; It starts to read it as text and not html?? Could this be a server side problem? $email = $_REQUEST['email'] ; $fromaddress .= '[EMAIL PROTECTED]'; $fromname .= 'Zone of success Club'; $eol="\r\n"; $headers = "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); You should not have a mime boundary in your headers. Why not use PHPMailer? All this (apparently) complicated stuff is already implemented for you. Either that or spend a few days learning about the structure of emails by following the links Daniel Brown sent you a few emails ago. PHPMailer can be found here: http://phpmailer.sf.net/ -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Brad wrote: Thank you so much! It worked like a champ first try! I would have never seen that and have been looking everywhere on the net for a working example! Funny thing is, right after is work perfectly twice, my database crashed! But, this is the technology we play with! Problem solved and I am going to post this code on the php website for others to reference! If you do please don't mention me. This might work but as I said in my email (which you clearly read very carefully!) it's not the right way to do it. Please pay particular notice to my last "important note" below... THIS CODE IS NOT SECURE. It's easily used as a mail relay script, so please don't use it in production or $DEITY will kill a bunch of kittens. -Stut -- http://stut.net/ -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 10:16 AM To: Brad Cc: php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: No access to the server command line to install it! And, I am into this guy too deep to switch technologies. For the next time around, no problem, this time I am just trying to get php to do what it is supposed to do. You don't need command line access to install it. PHPMailer consists of PHP only - nothing to install but PHP files. See here: http://phpmailer.sourceforge.net/install.php The suggestion of mime was presented to me from another kind sole trying to help that knows more than I and recommended on other help files. Why is php refusing to parse as html? And here lies the basic problem. PHP is *not* the thing that's refusing to parse it as HTML. Since you don't know that you really should do a lot of reading before you try sending HTML emails without using something like PHPMailer. For beeps and farts I've "fixed" your code, but even though it will now "work" it is nowhere near the right way to send this type of email, but my life is probably going to be too short to tell you what you could easily find out yourself. $email = $_REQUEST['email']; $fromaddress = '[EMAIL PROTECTED]'; $fromname = 'Zone of success Club'; $eol = "\r\n"; $headers = 'From: '.$fromname.' <'.$fromaddress.'>'.$eol; $headers .= 'Reply-To: '.$fromname.' <'.$fromaddress.'>'.$eol; $headers .= 'Return-Path: '.$fromname.' <'.$fromaddress.'>'.$eol; $headers .= 'X-Mailer: PHP '.phpversion().$eol; $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol; $headers .= 'Content-Transfer-Encoding: 8bit'; $subject = 'This is my spam, worship me'; $body = 'http://www.zoneofsuccessclub.com/";>link'; mail($email, $subject, $body, $headers); Some *important* notes... * I defined $subject because it tries to use it. * You don't need to provide the MessageID - your mail server will do that for you... correctly. * You don't need to add two carriage returns at the end of the headers - PHP will do that for you. * This email will be in HTML only which makes it a lot more likely to get flagged as spam. * If you're on a unix-based platform you really should be using the 5th parameter to mail, but that's probably going to confuse the hell out of you so I won't mention it. D'oh! * This code is not secure. It's trivial to inject headers (and a body too) into the message. You should be validating that $_REQUEST['email'] is a valid email address and just a valid email address. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
> Next time Brad, please try to take a look yourself at the line the error > indicates (and the lines around it aswell) and TRY to figure out what > MIGHT be wrong. > > - Tul If it's not on the line it reported, it may be immediately above that line. The only unhelpful error I've seen (once you know what T_STRING means) is when it gives you the last line number in your entire file. _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
RE: [PHP] Cannot send a hyperlink
> Still parsing as text and not html! You should be able to do this in both PHPmailer and "Example 1127. Sending HTML email" before I finish reading the 60 emails I have remaining to catch up on this list. Including any download. _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
> We are sending email now, > But we are back to the original problem, > No hyperlink! > > $email = $_REQUEST['email'] ; > $fromaddress .= '[EMAIL PROTECTED]'; > $fromname .= 'Zone of success Club'; > $eol="\r\n"; > $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP v".phpversion().$eol; > $msg .= "--".$htmlalt_mime_boundary.$eol; > $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body.= 'link '; > $msg .= $body.$eol.$eol; > mail($email, $subject, $msg, $headers); > > > Yields > > Parse error: parse error, unexpected T_STRING in > /home/zoneof5/public_html/index.php on line 76 If you can't deal with Example 1127. Sending HTML email http://php.net/manual/en/function.mail.php Check out http://phpmailer.sourceforge.net/ and http://phpmailer.sourceforge.net/tutorial.php#4 _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
On Nov 15, 2007 11:10 AM, Stut <[EMAIL PROTECTED]> wrote: > Daniel Brown wrote: > > On Nov 15, 2007 9:41 AM, Brad <[EMAIL PROTECTED]> wrote: > >> Beginning with > >> $headers .= "--".$htmlalt_mime_boundary.$eol; > >> It starts to read it as text and not html?? > >> > >> Could this be a server side problem? > > > > Negative. It's client-side error E304, resulting from a > > null-pointer exception between the chair and keyboard. > > Usually abbreviated to PEBKAC if I'm not mistaken. I'm afraid we're going to have to do a stack trace. [Snaps on rubber glove] Just try to relax. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Brad, please, try solving these kinds of things yourself. Especially seen as the parse error which you posted here was already found and shown to you in one of your earlier posts to this list (if I'm not mistaken). So, your problem is: $body.= 'http://www.zoneofsuccessclub.com'">link '; Try to spot the problem here. I'll give you a hint: it has to do with single-quotes. Right, I hope you've guessed it by now, but in case you haven't, let's dissect the problem: 'http://www.zoneofsuccessclub.com = unknown [1]? '">link ' = T_STRING So, we basically have 2 strings, with a bit of weirdness sandwiched in between them. To the parser: this might be several constants joined together using the . (concatenation operator). But: it can't be, because it has a : and a / in it. So... no, the parser has not a clue what this might be, so it spits out an error. So, how do you solve your problem; well, first of all, YOU know it's supposed to be a string, so let's make it one: $body.= 'http://www.zoneofsuccessclub.com'.'">link '; That would work, but it's needlessly complicated, we don't need to glue 3 strings together if we can do it all in 1 string aswell. So let's change it to: $body.= 'http://www.zoneofsuccessclub.com";>link '; whoa! it works! Next time Brad, please try to take a look yourself at the line the error indicates (and the lines around it aswell) and TRY to figure out what MIGHT be wrong. - Tul P.S. to [EMAIL PROTECTED], if you try saying "These are the same people who again and again are not the ones who answer the questions, yet try to take credit by belittling the answer with gibberish." about me once more, I will get very pissed. I spend a lot of time trying to get people to code efficiently and in a readable way. If I post to the list trying to bring clarity into your code, then there is a very good reason for it. I don't belittle your answer, and I don't appreciate such bullcrap. Brad wrote: We are sending email now, But we are back to the original problem, No hyperlink! $email = $_REQUEST['email'] ; $fromaddress .= '[EMAIL PROTECTED]'; $fromname .= 'Zone of success Club'; $eol="\r\n"; $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; $msg .= "--".$htmlalt_mime_boundary.$eol; $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body.= 'http://www.zoneofsuccessclub.com'">link '; $msg .= $body.$eol.$eol; mail($email, $subject, $msg, $headers); Yields Parse error: parse error, unexpected T_STRING in /home/zoneof5/public_html/index.php on line 76 -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 14, 2007 11:09 AM To: Brad Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad, That code is a mess and highly incorrect, even at a novice level. Let me give you a hand On Nov 14, 2007 10:31 AM, Brad <[EMAIL PROTECTED]> wrote: I implemented the proposed code, and emails are not being sent? Any suggestions? Here is the code ".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $msg .= "--".$htmlalt_mime_boundary.$eol; $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body.='link '; $msg .= $body.$eol.$eol; mail($to, $subject, $msg, $headers); ?> [snip] 1.) You reference $to in the mail() function, but there is no $to defined. Instead, either change $email to $to or vice-versa. 2.) You don't need to start the first line of a variable off with a .= --- this will append to an existing variable of the same name, if it exists. 3.) You change your quoting style where it's not necessary. All $msg lines should be using double quotes in your code above. 4.) ".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.&q
RE: [PHP] Cannot send a hyperlink (resent)
Brad wrote: > Why is php refusing to parse as html? Here your code cut down to what you need: $headers = "From: \"".$fromname."\" <".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n"; $headers .= "Content-Transfer-Encoding: 8bit".$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
No problem! -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 10:37 AM To: Brad Cc: php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: > Thank you so much! > > It worked like a champ first try! > I would have never seen that and have been looking everywhere on the net for > a working example! > > Funny thing is, right after is work perfectly twice, my database crashed! > > But, this is the technology we play with! > > Problem solved and I am going to post this code on the php website for > others to reference! If you do please don't mention me. This might work but as I said in my email (which you clearly read very carefully!) it's not the right way to do it. Please pay particular notice to my last "important note" below... THIS CODE IS NOT SECURE. It's easily used as a mail relay script, so please don't use it in production or $DEITY will kill a bunch of kittens. -Stut -- http://stut.net/ > -Original Message- > From: Stut [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 15, 2007 10:16 AM > To: Brad > Cc: php-general@lists.php.net > Subject: Re: [PHP] Cannot send a hyperlink > > Brad wrote: >> No access to the server command line to install it! >> And, I am into this guy too deep to switch technologies. For the next time >> around, no problem, this time I am just trying to get php to do what it is >> supposed to do. > > You don't need command line access to install it. PHPMailer consists of > PHP only - nothing to install but PHP files. See here: > http://phpmailer.sourceforge.net/install.php > >> The suggestion of mime was presented to me from another kind sole trying > to >> help that knows more than I and recommended on other help files. >> >> Why is php refusing to parse as html? > > And here lies the basic problem. PHP is *not* the thing that's refusing > to parse it as HTML. Since you don't know that you really should do a > lot of reading before you try sending HTML emails without using > something like PHPMailer. > > For beeps and farts I've "fixed" your code, but even though it will now > "work" it is nowhere near the right way to send this type of email, but > my life is probably going to be too short to tell you what you could > easily find out yourself. > > $email = $_REQUEST['email']; > $fromaddress = '[EMAIL PROTECTED]'; > $fromname = 'Zone of success Club'; > $eol = "\r\n"; > $headers = 'From: '.$fromname.' <'.$fromaddress.'>'.$eol; > $headers .= 'Reply-To: '.$fromname.' <'.$fromaddress.'>'.$eol; > $headers .= 'Return-Path: '.$fromname.' <'.$fromaddress.'>'.$eol; > $headers .= 'X-Mailer: PHP '.phpversion().$eol; > $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol; > $headers .= 'Content-Transfer-Encoding: 8bit'; > $subject = 'This is my spam, worship me'; > $body = 'http://www.zoneofsuccessclub.com/";>link'; > mail($email, $subject, $body, $headers); > > Some *important* notes... > > * I defined $subject because it tries to use it. > * You don't need to provide the MessageID - your mail server will do > that for you... correctly. > * You don't need to add two carriage returns at the end of the headers - > PHP will do that for you. > * This email will be in HTML only which makes it a lot more likely to > get flagged as spam. > * If you're on a unix-based platform you really should be using the 5th > parameter to mail, but that's probably going to confuse the hell out of > you so I won't mention it. D'oh! > * This code is not secure. It's trivial to inject headers (and a body > too) into the message. You should be validating that $_REQUEST['email'] > is a valid email address and just a valid email address. > > -Stut > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
Not a single reference to sending a hyperlink on that page! -Original Message- From: Dimiter Ivanov [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 11:27 AM To: Brad Cc: Stut; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink On Nov 15, 2007 5:34 PM, Brad <[EMAIL PROTECTED]> wrote: > Thank you so much! > > It worked like a champ first try! > I would have never seen that and have been looking everywhere on the net for > a working example! > > Funny thing is, right after is work perfectly twice, my database crashed! > > But, this is the technology we play with! > > Problem solved and I am going to post this code on the php website for > others to reference! > > Thank you! > I think there is already a good example of sending mails with html : http://php.net/manual/en/function.mail.php No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
Brad wrote: > Why is php refusing to parse as html? Here your code cut down to what you need: $headers = "From: \"".$fromname."\" <".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n"; $headers .= "Content-Transfer-Encoding: 8bit".$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
On Nov 15, 2007 11:20 AM, Stut <[EMAIL PROTECTED]> wrote: > Daniel Brown wrote: > > On Nov 15, 2007 11:10 AM, Stut <[EMAIL PROTECTED]> wrote: > >> Daniel Brown wrote: > >>> On Nov 15, 2007 9:41 AM, Brad <[EMAIL PROTECTED]> wrote: > Beginning with > $headers .= "--".$htmlalt_mime_boundary.$eol; > It starts to read it as text and not html?? > > Could this be a server side problem? > >>> Negative. It's client-side error E304, resulting from a > >>> null-pointer exception between the chair and keyboard. > >> Usually abbreviated to PEBKAC if I'm not mistaken. > > > > I'm afraid we're going to have to do a stack trace. > > > > [Snaps on rubber glove] > > > > Just try to relax. > > [Advises Brad to close his eyes and think of England] > > -Stut > > -- > http://stut.net/ > [Pulls out his sword, chants the words "oobi flexor gondalis exo" and conjures up LEVEL 12 warrior.] Figured if we were going to go OT and role-play, may as well geekspeak, too. ;-P -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
On Nov 15, 2007 5:34 PM, Brad <[EMAIL PROTECTED]> wrote: > Thank you so much! > > It worked like a champ first try! > I would have never seen that and have been looking everywhere on the net for > a working example! > > Funny thing is, right after is work perfectly twice, my database crashed! > > But, this is the technology we play with! > > Problem solved and I am going to post this code on the php website for > others to reference! > > Thank you! > I think there is already a good example of sending mails with html : http://php.net/manual/en/function.mail.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Daniel Brown wrote: On Nov 15, 2007 11:10 AM, Stut <[EMAIL PROTECTED]> wrote: Daniel Brown wrote: On Nov 15, 2007 9:41 AM, Brad <[EMAIL PROTECTED]> wrote: Beginning with $headers .= "--".$htmlalt_mime_boundary.$eol; It starts to read it as text and not html?? Could this be a server side problem? Negative. It's client-side error E304, resulting from a null-pointer exception between the chair and keyboard. Usually abbreviated to PEBKAC if I'm not mistaken. I'm afraid we're going to have to do a stack trace. [Snaps on rubber glove] Just try to relax. [Advises Brad to close his eyes and think of England] -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
Thank you so much! It worked like a champ first try! I would have never seen that and have been looking everywhere on the net for a working example! Funny thing is, right after is work perfectly twice, my database crashed! But, this is the technology we play with! Problem solved and I am going to post this code on the php website for others to reference! Thank you! -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 10:16 AM To: Brad Cc: php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: > No access to the server command line to install it! > And, I am into this guy too deep to switch technologies. For the next time > around, no problem, this time I am just trying to get php to do what it is > supposed to do. You don't need command line access to install it. PHPMailer consists of PHP only - nothing to install but PHP files. See here: http://phpmailer.sourceforge.net/install.php > The suggestion of mime was presented to me from another kind sole trying to > help that knows more than I and recommended on other help files. > > Why is php refusing to parse as html? And here lies the basic problem. PHP is *not* the thing that's refusing to parse it as HTML. Since you don't know that you really should do a lot of reading before you try sending HTML emails without using something like PHPMailer. For beeps and farts I've "fixed" your code, but even though it will now "work" it is nowhere near the right way to send this type of email, but my life is probably going to be too short to tell you what you could easily find out yourself. $email = $_REQUEST['email']; $fromaddress = '[EMAIL PROTECTED]'; $fromname = 'Zone of success Club'; $eol = "\r\n"; $headers = 'From: '.$fromname.' <'.$fromaddress.'>'.$eol; $headers .= 'Reply-To: '.$fromname.' <'.$fromaddress.'>'.$eol; $headers .= 'Return-Path: '.$fromname.' <'.$fromaddress.'>'.$eol; $headers .= 'X-Mailer: PHP '.phpversion().$eol; $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol; $headers .= 'Content-Transfer-Encoding: 8bit'; $subject = 'This is my spam, worship me'; $body = 'http://www.zoneofsuccessclub.com/";>link'; mail($email, $subject, $body, $headers); Some *important* notes... * I defined $subject because it tries to use it. * You don't need to provide the MessageID - your mail server will do that for you... correctly. * You don't need to add two carriage returns at the end of the headers - PHP will do that for you. * This email will be in HTML only which makes it a lot more likely to get flagged as spam. * If you're on a unix-based platform you really should be using the 5th parameter to mail, but that's probably going to confuse the hell out of you so I won't mention it. D'oh! * This code is not secure. It's trivial to inject headers (and a body too) into the message. You should be validating that $_REQUEST['email'] is a valid email address and just a valid email address. -Stut -- http://stut.net/ > -Original Message- > From: Stut [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 15, 2007 9:46 AM > To: Brad > Cc: 'Daniel Brown'; php-general@lists.php.net > Subject: Re: [PHP] Cannot send a hyperlink > > Brad wrote: >> Beginning with >> $headers .= "--".$htmlalt_mime_boundary.$eol; >> It starts to read it as text and not html?? >> >> Could this be a server side problem? >> >> $email = $_REQUEST['email'] ; >> $fromaddress .= '[EMAIL PROTECTED]'; >> $fromname .= 'Zone of success Club'; >> $eol="\r\n"; >> $headers = "From: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; >> $headers .= "X-Mailer: PHP ".phpversion().$eol; >> $headers .= "--".$htmlalt_mime_boundary.$eol; >> $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; >> $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; >> $body = "http://www.zoneofsuccessclub.com\";>link \n"; >> mail($email, $subject, $body, $headers); > > You should not have a mime boundary in your headers. Why not use > PHPMailer? All this (apparently) complicated stuff is already > implemented for you. Either that or spend a few days learning about the > structure of emails by following the links Daniel Brown sent you a few > emails ago. > > PHPMailer can be found here: http://phpmailer.sf.net/ > > -Stut > No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
On Thu, 15 Nov 2007 09:58:59 -0500, "Brad" <[EMAIL PROTECTED]> wrote: > Still parsing as text and not html! > > http://www.zoneofsuccessclub.com";>link > //http://www.zoneofsuccessclub.com";>link > > $email = $_REQUEST['email'] ; > $fromaddress .= '[EMAIL PROTECTED]'; > $fromname .= 'Zone of success Club'; > $eol="\r\n"; > $headers = "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP ".phpversion().$eol; > $body .= "--".$htmlalt_mime_boundary.$eol; > $body .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $body .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body = "http://www.zoneofsuccessclub.com\";>link \n"; > mail($email, $subject, $body, $headers); > > -Original Message- > From: Per Jessen [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 15, 2007 9:48 AM > To: php-general@lists.php.net > Subject: RE: [PHP] Cannot send a hyperlink > > Brad wrote: > >> Beginning with >> $headers .= "--".$htmlalt_mime_boundary.$eol; >> It starts to read it as text and not html?? >> >> Could this be a server side problem? > > Nope. > >> $email = $_REQUEST['email'] ; >> $fromaddress .= '[EMAIL PROTECTED]'; >> $fromname .= 'Zone of success Club'; >> $eol="\r\n"; >> $headers = "From: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; >> $headers .= "X-Mailer: PHP ".phpversion().$eol; >> $headers .= "--".$htmlalt_mime_boundary.$eol; >> $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; >> $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; >> $body = "http://www.zoneofsuccessclub.com\";>link \n"; > > You have a MIME boundary where it doesn't belong. MIME boundaries are > for the body, not the header. > > > /Per Jessen, Zürich Exactly. The boundry should be part of the body. And i agree with stut. Just use PHPMailer for this stuff. That's what it's for. When sending mail from PHP i always make sure there is a fallback for clients that don't accept HTML mail. When using your snippet my mail ends up in the junkmail box. And it's not HTML either. The headers are messed up. So a small example: $boundary = md5(uniqid(rand(), true)); $headers = "From: name <[EMAIL PROTECTED]>\r\n"; $headers .= "To: name <[EMAIL PROTECTED]>\r\n"; $headers .= "Subject: some subject\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=" . $boundary . "\r\n"; $body = "\r\n\r\n--" . $boundary . "\r\n"; $body .= "Content-Type: text/plain; charset=iso-8859-1\r\n\r\n"; $body .= "... plain text test version "; $body .= "\r\n\r\n--" . $boundary . "\r\n"; $body .= "Content-Type: text/richtext; charset=iso-8859-1\r\n"; $body .= " richtext test version ..."; $body .= "\r\n\r\n--" . $boundary . "\r\n"; $body .= "Content-Type: text/html; charset=iso-8859-1\r\n"; $body .= " HTML version ..."; $body .= "\r\n\r\n--" . $boundary . "--\r\n"; mail("[EMAIL PROTECTED]", "(some subject)", $body, $headers); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
On Nov 15, 2007 9:41 AM, Brad <[EMAIL PROTECTED]> wrote: > Beginning with > $headers .= "--".$htmlalt_mime_boundary.$eol; > It starts to read it as text and not html?? > > Could this be a server side problem? Negative. It's client-side error E304, resulting from a null-pointer exception between the chair and keyboard. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Brad wrote: My bad, You do not need command line access! I should have read more. I just need to get this puppy working is all. Php should be able to do this by it's self! It can, *if* you create the email correctly. PHPMailer will be quicker to put in than this merry-go-round you're on right now. Seriously. -Stut -- http://stut.net/ -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 9:46 AM To: Brad Cc: 'Daniel Brown'; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: Beginning with $headers .= "--".$htmlalt_mime_boundary.$eol; It starts to read it as text and not html?? Could this be a server side problem? $email = $_REQUEST['email'] ; $fromaddress .= '[EMAIL PROTECTED]'; $fromname .= 'Zone of success Club'; $eol="\r\n"; $headers = "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); You should not have a mime boundary in your headers. Why not use PHPMailer? All this (apparently) complicated stuff is already implemented for you. Either that or spend a few days learning about the structure of emails by following the links Daniel Brown sent you a few emails ago. PHPMailer can be found here: http://phpmailer.sf.net/ -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
Still parsing as text and not html! http://www.zoneofsuccessclub.com";>link //http://www.zoneofsuccessclub.com";>link $email = $_REQUEST['email'] ; $fromaddress .= '[EMAIL PROTECTED]'; $fromname .= 'Zone of success Club'; $eol="\r\n"; $headers = "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $body .= "--".$htmlalt_mime_boundary.$eol; $body .= "Content-Type: text/html; charset=iso-8859-1".$eol; $body .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); -Original Message- From: Per Jessen [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 9:48 AM To: php-general@lists.php.net Subject: RE: [PHP] Cannot send a hyperlink Brad wrote: > Beginning with > $headers .= "--".$htmlalt_mime_boundary.$eol; > It starts to read it as text and not html?? > > Could this be a server side problem? Nope. > $email = $_REQUEST['email'] ; > $fromaddress .= '[EMAIL PROTECTED]'; > $fromname .= 'Zone of success Club'; > $eol="\r\n"; > $headers = "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP ".phpversion().$eol; > $headers .= "--".$htmlalt_mime_boundary.$eol; > $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body = "http://www.zoneofsuccessclub.com\";>link \n"; You have a MIME boundary where it doesn't belong. MIME boundaries are for the body, not the header. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
No access to the server command line to install it! And, I am into this guy too deep to switch technologies. For the next time around, no problem, this time I am just trying to get php to do what it is supposed to do. The suggestion of mime was presented to me from another kind sole trying to help that knows more than I and recommended on other help files. Why is php refusing to parse as html? -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 9:46 AM To: Brad Cc: 'Daniel Brown'; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: > Beginning with > $headers .= "--".$htmlalt_mime_boundary.$eol; > It starts to read it as text and not html?? > > Could this be a server side problem? > > $email = $_REQUEST['email'] ; > $fromaddress .= '[EMAIL PROTECTED]'; > $fromname .= 'Zone of success Club'; > $eol="\r\n"; > $headers = "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP ".phpversion().$eol; > $headers .= "--".$htmlalt_mime_boundary.$eol; > $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body = "http://www.zoneofsuccessclub.com\";>link \n"; > mail($email, $subject, $body, $headers); You should not have a mime boundary in your headers. Why not use PHPMailer? All this (apparently) complicated stuff is already implemented for you. Either that or spend a few days learning about the structure of emails by following the links Daniel Brown sent you a few emails ago. PHPMailer can be found here: http://phpmailer.sf.net/ -Stut -- http://stut.net/ > -Original Message- > From: Daniel Brown [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 14, 2007 11:09 AM > To: Brad > Cc: [EMAIL PROTECTED]; php-general@lists.php.net > Subject: Re: [PHP] Cannot send a hyperlink > > Brad, > > That code is a mess and highly incorrect, even at a novice level. > Let me give you a hand > > On Nov 14, 2007 10:31 AM, Brad <[EMAIL PROTECTED]> wrote: >> I implemented the proposed code, and emails are not being sent? >> >> Any suggestions? >> >> Here is the code >> >> > >> $email = $_REQUEST['email'] ; >> $eol="\r\n"; >> $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; >> $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; >> $headers .= "X-Mailer: PHP ".phpversion().$eol; >> $msg .= "--".$htmlalt_mime_boundary.$eol; >> $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; >> $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; >> $body.='link '; >> $msg .= $body.$eol.$eol; >> mail($to, $subject, $msg, $headers); >> >> ?> > > [snip] > > 1.) You reference $to in the mail() function, but there is no $to > defined. Instead, either change $email to $to or vice-versa. > 2.) You don't need to start the first line of a variable off with > a .= --- this will append to an existing variable of the same name, if > it exists. > 3.) You change your quoting style where it's not necessary. All > $msg lines should be using double quotes in your code above. > 4.) 5.) You have things in the message body that should be in the headers. > 6.) You don't need to do a carriage return and newline in the > message body. A simple \n will suffice. > 7.) I'm not sure what you hoped to achieve with the > "'.www.domain.com.'" conglomerate, but don't. That makes PHP > think that the domain is some sort of internally-defined variable of > horrible construct. > 8.) You should use http:// prior to the FQDN. > > Taking hints from what appears to be your code, this is how it should > be: > $email = $_REQUEST['email'] ; > $eol="\r\n"; > $headers = "From: ".$fromname."<".$fr
RE: [PHP] Cannot send a hyperlink
Brad wrote: > Beginning with > $headers .= "--".$htmlalt_mime_boundary.$eol; > It starts to read it as text and not html?? > > Could this be a server side problem? Nope. > $email = $_REQUEST['email'] ; > $fromaddress .= '[EMAIL PROTECTED]'; > $fromname .= 'Zone of success Club'; > $eol="\r\n"; > $headers = "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP ".phpversion().$eol; > $headers .= "--".$htmlalt_mime_boundary.$eol; > $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body = "http://www.zoneofsuccessclub.com\";>link \n"; You have a MIME boundary where it doesn't belong. MIME boundaries are for the body, not the header. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Brad wrote: Beginning with $headers .= "--".$htmlalt_mime_boundary.$eol; It starts to read it as text and not html?? Could this be a server side problem? $email = $_REQUEST['email'] ; $fromaddress .= '[EMAIL PROTECTED]'; $fromname .= 'Zone of success Club'; $eol="\r\n"; $headers = "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); You should not have a mime boundary in your headers. Why not use PHPMailer? All this (apparently) complicated stuff is already implemented for you. Either that or spend a few days learning about the structure of emails by following the links Daniel Brown sent you a few emails ago. PHPMailer can be found here: http://phpmailer.sf.net/ -Stut -- http://stut.net/ -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 14, 2007 11:09 AM To: Brad Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad, That code is a mess and highly incorrect, even at a novice level. Let me give you a hand On Nov 14, 2007 10:31 AM, Brad <[EMAIL PROTECTED]> wrote: I implemented the proposed code, and emails are not being sent? Any suggestions? Here is the code ".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $msg .= "--".$htmlalt_mime_boundary.$eol; $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body.='link '; $msg .= $body.$eol.$eol; mail($to, $subject, $msg, $headers); ?> [snip] 1.) You reference $to in the mail() function, but there is no $to defined. Instead, either change $email to $to or vice-versa. 2.) You don't need to start the first line of a variable off with a .= --- this will append to an existing variable of the same name, if it exists. 3.) You change your quoting style where it's not necessary. All $msg lines should be using double quotes in your code above. 4.) ".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); ?> Prior to asking a bunch of questions on the list, which seriously puts you at risk for being flamed or ignored, check out these references: http://www.bath.ac.uk/bucs/email/anatomy.shtml [Anatomy of an Email Message] http://www.php.net/mail [PHP Mail Functions] http://www.htmlgoodies.com/primers/html/ [Beginner's Guide to HTML] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
Beginning with $headers .= "--".$htmlalt_mime_boundary.$eol; It starts to read it as text and not html?? Could this be a server side problem? $email = $_REQUEST['email'] ; $fromaddress .= '[EMAIL PROTECTED]'; $fromname .= 'Zone of success Club'; $eol="\r\n"; $headers = "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 14, 2007 11:09 AM To: Brad Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad, That code is a mess and highly incorrect, even at a novice level. Let me give you a hand On Nov 14, 2007 10:31 AM, Brad <[EMAIL PROTECTED]> wrote: > I implemented the proposed code, and emails are not being sent? > > Any suggestions? > > Here is the code > > > $email = $_REQUEST['email'] ; > $eol="\r\n"; > $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP ".phpversion().$eol; > $msg .= "--".$htmlalt_mime_boundary.$eol; > $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body.='link '; > $msg .= $body.$eol.$eol; > mail($to, $subject, $msg, $headers); > > ?> [snip] 1.) You reference $to in the mail() function, but there is no $to defined. Instead, either change $email to $to or vice-versa. 2.) You don't need to start the first line of a variable off with a .= --- this will append to an existing variable of the same name, if it exists. 3.) You change your quoting style where it's not necessary. All $msg lines should be using double quotes in your code above. 4.) ".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); ?> Prior to asking a bunch of questions on the list, which seriously puts you at risk for being flamed or ignored, check out these references: http://www.bath.ac.uk/bucs/email/anatomy.shtml [Anatomy of an Email Message] http://www.php.net/mail [PHP Mail Functions] http://www.htmlgoodies.com/primers/html/ [Beginner's Guide to HTML] -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.31/1128 - Release Date: 11/13/2007 11:09 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
Hm, Still no hyperlink? $email = $_REQUEST['email'] ; $fromaddress .= '[EMAIL PROTECTED]'; $fromname .= 'Zone of success Club'; $eol="\r\n"; $headers = "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); Produces and email that does this. -- Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit http://www.zoneofsuccessclub.com";>link No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 14, 2007 11:09 AM To: Brad Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad, That code is a mess and highly incorrect, even at a novice level. Let me give you a hand On Nov 14, 2007 10:31 AM, Brad <[EMAIL PROTECTED]> wrote: > I implemented the proposed code, and emails are not being sent? > > Any suggestions? > > Here is the code > > > $email = $_REQUEST['email'] ; > $eol="\r\n"; > $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP ".phpversion().$eol; > $msg .= "--".$htmlalt_mime_boundary.$eol; > $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body.='link '; > $msg .= $body.$eol.$eol; > mail($to, $subject, $msg, $headers); > > ?> [snip] 1.) You reference $to in the mail() function, but there is no $to defined. Instead, either change $email to $to or vice-versa. 2.) You don't need to start the first line of a variable off with a .= --- this will append to an existing variable of the same name, if it exists. 3.) You change your quoting style where it's not necessary. All $msg lines should be using double quotes in your code above. 4.) ".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); ?> Prior to asking a bunch of questions on the list, which seriously puts you at risk for being flamed or ignored, check out these references: http://www.bath.ac.uk/bucs/email/anatomy.shtml [Anatomy of an Email Message] http://www.php.net/mail [PHP Mail Functions] http://www.htmlgoodies.com/primers/html/ [Beginner's Guide to HTML] -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.31/1128 - Release Date: 11/13/2007 11:09 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
We are sending email now, But we are back to the original problem, No hyperlink! $email = $_REQUEST['email'] ; $fromaddress .= '[EMAIL PROTECTED]'; $fromname .= 'Zone of success Club'; $eol="\r\n"; $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; $msg .= "--".$htmlalt_mime_boundary.$eol; $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body.= 'http://www.zoneofsuccessclub.com'">link '; $msg .= $body.$eol.$eol; mail($email, $subject, $msg, $headers); Yields Parse error: parse error, unexpected T_STRING in /home/zoneof5/public_html/index.php on line 76 -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 14, 2007 11:09 AM To: Brad Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad, That code is a mess and highly incorrect, even at a novice level. Let me give you a hand On Nov 14, 2007 10:31 AM, Brad <[EMAIL PROTECTED]> wrote: > I implemented the proposed code, and emails are not being sent? > > Any suggestions? > > Here is the code > > > $email = $_REQUEST['email'] ; > $eol="\r\n"; > $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP ".phpversion().$eol; > $msg .= "--".$htmlalt_mime_boundary.$eol; > $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body.='link '; > $msg .= $body.$eol.$eol; > mail($to, $subject, $msg, $headers); > > ?> [snip] 1.) You reference $to in the mail() function, but there is no $to defined. Instead, either change $email to $to or vice-versa. 2.) You don't need to start the first line of a variable off with a .= --- this will append to an existing variable of the same name, if it exists. 3.) You change your quoting style where it's not necessary. All $msg lines should be using double quotes in your code above. 4.) ".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); ?> Prior to asking a bunch of questions on the list, which seriously puts you at risk for being flamed or ignored, check out these references: http://www.bath.ac.uk/bucs/email/anatomy.shtml [Anatomy of an Email Message] http://www.php.net/mail [PHP Mail Functions] http://www.htmlgoodies.com/primers/html/ [Beginner's Guide to HTML] -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.31/1128 - Release Date: 11/13/2007 11:09 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007 4:54 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
I implemented the proposed code, and emails are not being sent? Any suggestions? Here is the code ".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $msg .= "--".$htmlalt_mime_boundary.$eol; $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body.='link '; $msg .= $body.$eol.$eol; mail($to, $subject, $msg, $headers); ?> -Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, November 11, 2007 7:43 AM To: 'M. Sokolewicz' Cc: 'Brad'; php-general@lists.php.net Subject: RE: [PHP] Cannot send a hyperlink Brad I'm sorry. Instead of insulting you and telling you to go read a book I simply explained an option. Yes you do not need quotes in the mail() function. As for the declared variables I was trying to show you an example. You will find many explanations for how or what is best practice. Remember that some people like to toot a horn that can be reputed in many ways. These are the same people who again and again are not the ones who answer the questions, yet try to take credit by belittling the answer with gibberish. The answer was intended to take you in a better direction when constructing a email application in php. $eol="\r\n"; $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; $msg .= "--".$htmlalt_mime_boundary.$eol; $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $msg .= $body.$eol.$eol; mail($to, $subject, $msg, $headers); -Original Message- From: M. Sokolewicz [mailto:[EMAIL PROTECTED] Sent: Sunday, November 11, 2007 4:07 AM To: [EMAIL PROTECTED] Cc: 'Brad'; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink [EMAIL PROTECTED] wrote: > The Answer is quiet simple. > > > $E_MAIL = "[EMAIL PROTECTED]"; > $to = "[EMAIL PROTECTED]"; > $headers = "MIME-Version: 1.0\r\n"; > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; > $headers .= "To: Their Name<[EMAIL PROTECTED]> \r\n"; > $headers .= "From: your email <[EMAIL PROTECTED]>\r\n"; > $link = "http://www.zoneofsuccessclub.com";; > $mailmsg = "BLAH BLAH BLAH link:zoneofsuccessclub"; > $mailsubject = "what ever you want to say"; Well, anyone doing this: > mail("$E_MAIL", "$mailsubject", "$mailmsg", "$headers"); makes ME very unhappy. I don't get it, what's so hard to understand about NOT HAVING TO USE ANY QUOTES HERE ? Are you defining any type of string-like values here? no. Then you don't need quotes, right? no, you don't. SO DON'T USE THEM HERE THEN. You're defining a $to and an $E_MAIL, you're not using $to anywhere, and only using $E_MAIL in one place (out of two), thus creating a mismatch between your headers and the To parameter for mail (which is used in SMTP traffic). [iz bad (tm)] - Tul > > > > You can use the database to generate the $E_MAIL address and the $to > Never Ever had this to not work. > Your problem is the Headers are missing which allows the html content to > embed into the email. > > Try that I think you will be happy. > > > > > -Original Message- > From: Brad [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 10, 2007 2:36 PM > To: php-general@lists.php.net > Subject: [PHP] Cannot send a hyperlink > > I am having trouble send an email with a hyperlink > > Php is parsing html as text > > If I add the proper header information to ?make it work? The email no longer > goes through? > > > > Here is the code > > > > > $email = $_REQUEST['email'] ; > > $body = 'link '; > > $headers = 'MIME-Version: 1.0' . "\r\n"; > > $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; &g
Re: [PHP] Cannot send a hyperlink
Brad, That code is a mess and highly incorrect, even at a novice level. Let me give you a hand On Nov 14, 2007 10:31 AM, Brad <[EMAIL PROTECTED]> wrote: > I implemented the proposed code, and emails are not being sent? > > Any suggestions? > > Here is the code > > > $email = $_REQUEST['email'] ; > $eol="\r\n"; > $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; > $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; > $headers .= "X-Mailer: PHP ".phpversion().$eol; > $msg .= "--".$htmlalt_mime_boundary.$eol; > $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; > $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; > $body.='link '; > $msg .= $body.$eol.$eol; > mail($to, $subject, $msg, $headers); > > ?> [snip] 1.) You reference $to in the mail() function, but there is no $to defined. Instead, either change $email to $to or vice-versa. 2.) You don't need to start the first line of a variable off with a .= --- this will append to an existing variable of the same name, if it exists. 3.) You change your quoting style where it's not necessary. All $msg lines should be using double quotes in your code above. 4.) ".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP ".phpversion().$eol; $headers .= "--".$htmlalt_mime_boundary.$eol; $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; $headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body = "http://www.zoneofsuccessclub.com\";>link \n"; mail($email, $subject, $body, $headers); ?> Prior to asking a bunch of questions on the list, which seriously puts you at risk for being flamed or ignored, check out these references: http://www.bath.ac.uk/bucs/email/anatomy.shtml [Anatomy of an Email Message] http://www.php.net/mail [PHP Mail Functions] http://www.htmlgoodies.com/primers/html/ [Beginner's Guide to HTML] -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
Brad I'm sorry. Instead of insulting you and telling you to go read a book I simply explained an option. Yes you do not need quotes in the mail() function. As for the declared variables I was trying to show you an example. You will find many explanations for how or what is best practice. Remember that some people like to toot a horn that can be reputed in many ways. These are the same people who again and again are not the ones who answer the questions, yet try to take credit by belittling the answer with gibberish. The answer was intended to take you in a better direction when constructing a email application in php. $eol="\r\n"; $headers .= "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; $msg .= "--".$htmlalt_mime_boundary.$eol; $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $msg .= $body.$eol.$eol; mail($to, $subject, $msg, $headers); -Original Message- From: M. Sokolewicz [mailto:[EMAIL PROTECTED] Sent: Sunday, November 11, 2007 4:07 AM To: [EMAIL PROTECTED] Cc: 'Brad'; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink [EMAIL PROTECTED] wrote: > The Answer is quiet simple. > > > $E_MAIL = "[EMAIL PROTECTED]"; > $to = "[EMAIL PROTECTED]"; > $headers = "MIME-Version: 1.0\r\n"; > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; > $headers .= "To: Their Name<[EMAIL PROTECTED]> \r\n"; > $headers .= "From: your email <[EMAIL PROTECTED]>\r\n"; > $link = "http://www.zoneofsuccessclub.com";; > $mailmsg = "BLAH BLAH BLAH link:zoneofsuccessclub"; > $mailsubject = "what ever you want to say"; Well, anyone doing this: > mail("$E_MAIL", "$mailsubject", "$mailmsg", "$headers"); makes ME very unhappy. I don't get it, what's so hard to understand about NOT HAVING TO USE ANY QUOTES HERE ? Are you defining any type of string-like values here? no. Then you don't need quotes, right? no, you don't. SO DON'T USE THEM HERE THEN. You're defining a $to and an $E_MAIL, you're not using $to anywhere, and only using $E_MAIL in one place (out of two), thus creating a mismatch between your headers and the To parameter for mail (which is used in SMTP traffic). [iz bad (tm)] - Tul > > > > You can use the database to generate the $E_MAIL address and the $to > Never Ever had this to not work. > Your problem is the Headers are missing which allows the html content to > embed into the email. > > Try that I think you will be happy. > > > > > -Original Message- > From: Brad [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 10, 2007 2:36 PM > To: php-general@lists.php.net > Subject: [PHP] Cannot send a hyperlink > > I am having trouble send an email with a hyperlink > > Php is parsing html as text > > If I add the proper header information to ?make it work? The email no longer > goes through? > > > > Here is the code > > > > > $email = $_REQUEST['email'] ; > > $body = 'link '; > > $headers = 'MIME-Version: 1.0' . "\r\n"; > > $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; > > mail( $email, "Your FREE book from Zone of Success Club .com", > > $headers, $message, "From: $email" ); > > ?> > > > > Thanks > > Brad > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 > 10:41 AM > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
[EMAIL PROTECTED] wrote: The Answer is quiet simple. $E_MAIL = "[EMAIL PROTECTED]"; $to = "[EMAIL PROTECTED]"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "To: Their Name<[EMAIL PROTECTED]> \r\n"; $headers .= "From: your email <[EMAIL PROTECTED]>\r\n"; $link = "http://www.zoneofsuccessclub.com";; $mailmsg = "BLAH BLAH BLAH link:zoneofsuccessclub"; $mailsubject = "what ever you want to say"; Well, anyone doing this: mail("$E_MAIL", "$mailsubject", "$mailmsg", "$headers"); makes ME very unhappy. I don't get it, what's so hard to understand about NOT HAVING TO USE ANY QUOTES HERE ? Are you defining any type of string-like values here? no. Then you don't need quotes, right? no, you don't. SO DON'T USE THEM HERE THEN. You're defining a $to and an $E_MAIL, you're not using $to anywhere, and only using $E_MAIL in one place (out of two), thus creating a mismatch between your headers and the To parameter for mail (which is used in SMTP traffic). [iz bad (tm)] - Tul You can use the database to generate the $E_MAIL address and the $to Never Ever had this to not work. Your problem is the Headers are missing which allows the html content to embed into the email. Try that I think you will be happy. -Original Message- From: Brad [mailto:[EMAIL PROTECTED] Sent: Saturday, November 10, 2007 2:36 PM To: php-general@lists.php.net Subject: [PHP] Cannot send a hyperlink I am having trouble send an email with a hyperlink Php is parsing html as text If I add the proper header information to ?make it work? The email no longer goes through? Here is the code link '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail( $email, "Your FREE book from Zone of Success Club .com", $headers, $message, "From: $email" ); ?> Thanks Brad No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
The Answer is quiet simple. $E_MAIL = "[EMAIL PROTECTED]"; $to = "[EMAIL PROTECTED]"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "To: Their Name<[EMAIL PROTECTED]> \r\n"; $headers .= "From: your email <[EMAIL PROTECTED]>\r\n"; $link = "http://www.zoneofsuccessclub.com";; $mailmsg = "BLAH BLAH BLAH link:zoneofsuccessclub"; $mailsubject = "what ever you want to say"; mail("$E_MAIL", "$mailsubject", "$mailmsg", "$headers"); You can use the database to generate the $E_MAIL address and the $to Never Ever had this to not work. Your problem is the Headers are missing which allows the html content to embed into the email. Try that I think you will be happy. -Original Message- From: Brad [mailto:[EMAIL PROTECTED] Sent: Saturday, November 10, 2007 2:36 PM To: php-general@lists.php.net Subject: [PHP] Cannot send a hyperlink I am having trouble send an email with a hyperlink Php is parsing html as text If I add the proper header information to ?make it work? The email no longer goes through? Here is the code link '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail( $email, "Your FREE book from Zone of Success Club .com", $headers, $message, "From: $email" ); ?> Thanks Brad No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Brad wrote: Explanation of code $email = $_REQUEST['email'] ; (generated by dreamweaver that pulls in the database functions) No database involved here. None. Nadda. Niet! $message = 'link '; (my nemesis, I can not figure out this puppy. If it works at all, php will generate it at text and not html. Taken from example I find on the web.) That's because it's not valid PHP. This is probably what you're after... $message = 'http://www.zoneofsuccessclub.com";>link'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; (found on the web to solve my html problem???) That looks reasonable. mail( $email, "Your FREE book from Zone of Success Club .com", $headers, $message, "From: $email" ); ?> (Send the mail, when I put $headers in, the function quits working all together.) That's because it's in the wrong place. Did you even look at the manual like I suggested in my previous message? I hope this helps explain where my head is! My advice to you is to get a beginners book on basic PHP. If you can't see what's wrong with the above then you are lacking some foundation knowledge of PHP. -Stut -- http://stut.net/ -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Saturday, November 10, 2007 4:55 PM To: Brad Cc: 'Jochem Maas'; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: I am not sure that would help. Just another can of worms. The $_REQUEST is tied into a whole bunch of database functions. I have no idea what you mean by this. It makes no sense to me. My present code link '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail( $email, "Your FREE book from Zone of Success Club .com", $headers, $message, "From: $email" ); ?> You *really* need to read the manual page for function before you use them. For example a quick glance at http://php.net/function.mail reveals that you have the parameters in an almost completely wrong order. And please tell me you're not really setting the to address directly from an external variable with verifying that it's just an email address and nothing else. Really bad idea. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
Explanation of code $email = $_REQUEST['email'] ; (generated by dreamweaver that pulls in the database functions) $message = 'link '; (my nemesis, I can not figure out this puppy. If it works at all, php will generate it at text and not html. Taken from example I find on the web.) $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; (found on the web to solve my html problem???) mail( $email, "Your FREE book from Zone of Success Club .com", $headers, $message, "From: $email" ); ?> (Send the mail, when I put $headers in, the function quits working all together.) I hope this helps explain where my head is! Brad -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Saturday, November 10, 2007 4:55 PM To: Brad Cc: 'Jochem Maas'; php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: > I am not sure that would help. > Just another can of worms. > The $_REQUEST is tied into a whole bunch of database functions. I have no idea what you mean by this. It makes no sense to me. > My present code > > >$email = $_REQUEST['email'] ; > $message = 'link '; > $headers = 'MIME-Version: 1.0' . "\r\n"; > $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; > mail( $email, "Your FREE book from Zone of Success Club .com", > $headers, $message, "From: $email" ); > ?> You *really* need to read the manual page for function before you use them. For example a quick glance at http://php.net/function.mail reveals that you have the parameters in an almost completely wrong order. And please tell me you're not really setting the to address directly from an external variable with verifying that it's just an email address and nothing else. Really bad idea. -Stut -- http://stut.net/ > -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 10, 2007 3:44 PM > To: Brad > Subject: Re: [PHP] Cannot send a hyperlink > > this will help: http://phpmailer.sourceforge.net/ > > Brad wrote: >> I am having trouble send an email with a hyperlink >> >> Php is parsing html as text >> >> If I add the proper header information to ?make it work? The email no > longer >> goes through? >> >> >> >> Here is the code >> >> >> >> > >> $email = $_REQUEST['email'] ; >> >> $body = 'link '; >> >> $headers = 'MIME-Version: 1.0' . "\r\n"; >> >> $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; >> >> mail( $email, "Your FREE book from Zone of Success Club .com", >> >> $headers, $message, "From: $email" ); >> >> ?> >> >> >> >> Thanks >> >> Brad >> >> >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: > 11/10/2007 >> 10:41 AM >> >> > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 > 10:41 AM > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 > 10:41 AM No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
I am reading up on it now. I am going to take your advice. Be prepared for a few questions as I make it past the learning curve! :o) -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Saturday, November 10, 2007 4:47 PM To: Brad Cc: php-general@lists.php.net Subject: Re: [PHP] Cannot send a hyperlink Brad wrote: > I am not sure that would help. I am. > Just another can of worms. no, not really, not at all. > The $_REQUEST is tied into a whole bunch of database functions. wtf. $_REQUEST is a super global - nothing what so ever to do with databases. > > My present code > is about as robust as a soap bubble. in a world where 60-70 of all mail is SPAM how far do you think the crufty output your generating is going to get? my guess is generally just as far as /dev/null on the recipient machine. which is why I suggested a mailer class that is known to work and wraps up all the tricky crap (and protects you from making stupid mistakes like opening up the mail() function to mail header injection attacks. most people will probably be using a DB as the source of dynamic content for generated emails, your situation is nothing special in that regard. > >$email = $_REQUEST['email'] ; oh yeah and taking the 'to' email address from the request is just asking for your script to be turned into spambot. > $message = 'link '; > $headers = 'MIME-Version: 1.0' . "\r\n"; > $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; > mail( $email, "Your FREE book from Zone of Success Club .com", > $headers, $message, "From: $email" ); > ?> > > -----Original Message----- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 10, 2007 3:44 PM > To: Brad > Subject: Re: [PHP] Cannot send a hyperlink > > this will help: http://phpmailer.sourceforge.net/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Brad wrote: I am not sure that would help. Just another can of worms. The $_REQUEST is tied into a whole bunch of database functions. I have no idea what you mean by this. It makes no sense to me. My present code link '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail( $email, "Your FREE book from Zone of Success Club .com", $headers, $message, "From: $email" ); ?> You *really* need to read the manual page for function before you use them. For example a quick glance at http://php.net/function.mail reveals that you have the parameters in an almost completely wrong order. And please tell me you're not really setting the to address directly from an external variable with verifying that it's just an email address and nothing else. Really bad idea. -Stut -- http://stut.net/ -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Saturday, November 10, 2007 3:44 PM To: Brad Subject: Re: [PHP] Cannot send a hyperlink this will help: http://phpmailer.sourceforge.net/ Brad wrote: I am having trouble send an email with a hyperlink Php is parsing html as text If I add the proper header information to ?make it work? The email no longer goes through? Here is the code link '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail( $email, "Your FREE book from Zone of Success Club .com", $headers, $message, "From: $email" ); ?> Thanks Brad No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot send a hyperlink
Brad wrote: > I am not sure that would help. I am. > Just another can of worms. no, not really, not at all. > The $_REQUEST is tied into a whole bunch of database functions. wtf. $_REQUEST is a super global - nothing what so ever to do with databases. > > My present code > is about as robust as a soap bubble. in a world where 60-70 of all mail is SPAM how far do you think the crufty output your generating is going to get? my guess is generally just as far as /dev/null on the recipient machine. which is why I suggested a mailer class that is known to work and wraps up all the tricky crap (and protects you from making stupid mistakes like opening up the mail() function to mail header injection attacks. most people will probably be using a DB as the source of dynamic content for generated emails, your situation is nothing special in that regard. > >$email = $_REQUEST['email'] ; oh yeah and taking the 'to' email address from the request is just asking for your script to be turned into spambot. > $message = 'link '; > $headers = 'MIME-Version: 1.0' . "\r\n"; > $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; > mail( $email, "Your FREE book from Zone of Success Club .com", > $headers, $message, "From: $email" ); > ?> > > -----Original Message----- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 10, 2007 3:44 PM > To: Brad > Subject: Re: [PHP] Cannot send a hyperlink > > this will help: http://phpmailer.sourceforge.net/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot send a hyperlink
I am not sure that would help. Just another can of worms. The $_REQUEST is tied into a whole bunch of database functions. My present code link '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail( $email, "Your FREE book from Zone of Success Club .com", $headers, $message, "From: $email" ); ?> -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Saturday, November 10, 2007 3:44 PM To: Brad Subject: Re: [PHP] Cannot send a hyperlink this will help: http://phpmailer.sourceforge.net/ Brad wrote: > I am having trouble send an email with a hyperlink > > Php is parsing html as text > > If I add the proper header information to ?make it work? The email no longer > goes through? > > > > Here is the code > > > > > $email = $_REQUEST['email'] ; > > $body = 'link '; > > $headers = 'MIME-Version: 1.0' . "\r\n"; > > $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; > > mail( $email, "Your FREE book from Zone of Success Club .com", > > $headers, $message, "From: $email" ); > > ?> > > > > Thanks > > Brad > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 > 10:41 AM > > No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007 10:41 AM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php