Re: [PHP] mail headers
On Tue, July 25, 2006 11:47 pm, Chris wrote: There's a default for reply-to in the php.ini? What's the variable called - I can't see one. I can see these: ; For Win32 only. sendmail_from = [EMAIL PROTECTED] ; For Unix only. You may supply arguments as well (default: 'sendmail -t -i'). ;sendmail_path = but they have nothing to do with the reply-to address. I think you would want something like: sendmail_path = /usr/bin/sendmail -froot -t -i The -froot sets the 'from' as documented in man sendmail. But that's only supposed to be for trusted users, and it's unlikely that you configured sendmail for the PHP/Apache user to be trusted... But this is the Right Path to follow for this issue, I think. Have fun reading sendmail docs. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail headers
Greetings Everyone, What in the piece of code below might be causing the headers for from and reply-to to be set incorrectly? ' $headers = MIME-Version: 1.0\r\n. Content-type: text/html; charset=iso-8859-1\r\n. From: .$email.\r\n. Reply-to: .$email.\r\n. Date: .date(r).\r\n; ' Using Thunderbird on XP it does set the from correctly but then uses the default from address set in php.ini for the reply-to. Any ideas? Thanks! -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Business.Solution.Developers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail headers
Schalk wrote: Greetings Everyone, What in the piece of code below might be causing the headers for from and reply-to to be set incorrectly? ' $headers = MIME-Version: 1.0\r\n. Content-type: text/html; charset=iso-8859-1\r\n. From: .$email.\r\n. Reply-to: .$email.\r\n. Date: .date(r).\r\n; ' Using Thunderbird on XP it does set the from correctly but then uses the default from address set in php.ini for the reply-to. Any ideas? Thanks! There's a default for reply-to in the php.ini? What's the variable called - I can't see one. I can see these: [mail function] ; For Win32 only. SMTP = localhost ; For Win32 only. sendmail_from = [EMAIL PROTECTED] ; For Unix only. You may supply arguments as well (default: 'sendmail -t -i'). ;sendmail_path = but they have nothing to do with the reply-to address. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail headers
Hello all, I searched for this but did not find what I was looking for. I want to send a file from a directory, i know how to do that in txt but I would like to send a doc or rtf document. Is the header like this: $headers = Content-Type: multipart/mixed; Thanks, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Headers
You can view the source from an email message with Outlook or Thunderbird, and it will show headers and all that stuff... --- Miguel J. Jiménez ISOTROL, S.A. (Área de Internet) Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA) [EMAIL PROTECTED] TLFNO. 955036800 ext. 111 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail headers mail filtering
Hi Tom I did finally get my mails on this account (my personal mailbox) hours later but my main problem is with mails sent by scripts on my site (using the mailserver of my web provider) and other people complaining to me that they dont get mails sent from their websites to their ISP mailboxes (using my scripts). More and more legitimate mails are being trashed as a result of anti-spamming systems - read around the IT news. Whether it is illegal or not I don't know but yesterday I cancelled my account with my ISP because they refuse to answer my questions re if they have a mail filtering policy and if they do what is it. Debbie - Original Message - From: Tom Rogers [EMAIL PROTECTED] To: debbie_dyer [EMAIL PROTECTED] Sent: Tuesday, October 01, 2002 2:13 AM Subject: Re: [PHP] mail headers mail filtering Hi, Tuesday, October 1, 2002, 12:09:06 AM, you wrote: d More and more emails seem to be getting blocked by mail filtering systems looking for spam (but trashing legitimate mail at the same time). Does anyone have any tips for ensuring mails get through d these systems (with regard to headers) or do we just have to accept now that email can no longer be relied upon as a means of communication? d Debbie This one arrived ok to the list. If the isp is interfering with legitimate mail then they are probably infringing some law or other :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail headers mail filtering
More and more emails seem to be getting blocked by mail filtering systems looking for spam (but trashing legitimate mail at the same time). Does anyone have any tips for ensuring mails get through these systems (with regard to headers) or do we just have to accept now that email can no longer be relied upon as a means of communication? Debbie
[PHP] mail headers filtering
I sent this mail earlier:- More and more emails seem to be getting blocked by mail filtering systems looking for spam (but trashing legitimate mail at the same time). Does anyone have any tips for ensuring mails get through these systems (with regard to headers) or do we just have to accept now that email can no longer be relied upon as a means of communication? I don't know if it arrived or if there were any replies due to my own provider blocking my mails - I know they are doing it because I tested it myself and because I have just subscribed to this list under another email address - this other email ad is receiving the php list mails the other is not. Time to change ISP but anyway, if this mail was received and there were any replies, I'd be grateful if someone could forward them to me. Thanks Debbie
Re: [PHP] mail headers filtering
Debbie, Your post got through. I've not seen any replies. If all ISPs dealt with spam generated by their own customers promptly, and passed on the info to the right ISP if not them, then the net could be virtually spam free (well, maybe). Regards Chris Debbie Dyer wrote: I sent this mail earlier:- More and more emails seem to be getting blocked by mail filtering systems looking for spam (but trashing legitimate mail at the same time). Does anyone have any tips for ensuring mails get through these systems (with regard to headers) or do we just have to accept now that email can no longer be relied upon as a means of communication? I don't know if it arrived or if there were any replies due to my own provider blocking my mails - I know they are doing it because I tested it myself and because I have just subscribed to this list under another email address - this other email ad is receiving the php list mails the other is not. Time to change ISP but anyway, if this mail was received and there were any replies, I'd be grateful if someone could forward them to me. Thanks Debbie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Headers problem.......
Per your request.. Chris // To email address if(substr($lines[$i], 0, 2) == To){ $To = substr($lines[$i], 4, strlen($lines[$i])); eregi(([A-Z0-9\.\-]+@[A-Z0-9\.\-]+\.[A-Z\.]+), $To, $To); }elseif(substr($lines[$i], 0, 4) == From){// From email address $From = substr($lines[$i], 6, strlen($lines[$i])); eregi(([A-Z0-9\.\-]+@[A-Z0-9\.\-]+\.[A-Z\.]+), $From, $From); }elseif(substr($lines[$i], 0, 7) == Subject){// Email subject $Subject = substr($lines[$i], 9, strlen($lines[$i])); }elseif(substr($lines[$i], 0, 12) == MIME-Version){// Email subject $Mime_Version = substr($lines[$i], 14, strlen($lines[$i])); }elseif(substr($lines[$i], 0, 12) == Content-Type){// Email subject $Content_Type = substr($lines[$i], 14, strlen($lines[$i])); } if(IsSet($Mime_Version)){ $Mime_Version = MIME-Version: $Mime_Version\r\n; } if(IsSet($Content_Type)){ $Content_Type = Content-type: $Content_Type\r\n; } At 11:55 PM 5/23/2002, you wrote: On Thu, May 23, 2002 at 10:19:51PM -0500, CDitty wrote: $to = $user_email[0]; $subj = $Subject; $msg = $Message; $headers = From: $From[1]\n; $headers .= $Mime_Version; $headers .= $Content_Type; You're not showing us how you come up with the $From[1], $Mime_Version and $Content_Type variables. I'm guessing the $Mime_Version is only getting Status:\n stuck into it. Then, your $headers string adds the extra \n which results in the following output you're showing... Subject: test From: [EMAIL PROTECTED] Status: Content-type: text/plain; charset=us-ascii; format=flowed test 1234 Later, --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- 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] Mail Headers problem.......
Hi: Per your request.. [... code snipped ...] My request was really for you to examine your code, not to send the code to me: ... I'm guessing the $Mime_Version is only getting Status:\n stuck into it. Then, your $headers string adds the extra \n which results in the following output you're showing... So, go take a look at the parts of your script where you set $Mime_Version and everything in that is used in the creation of that variable. Enjoy, --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Headers problem.......
I have looked at it and from what I understand, it should be working but it's not. At 12:18 PM 5/24/2002, you wrote: Hi: Per your request.. [... code snipped ...] My request was really for you to examine your code, not to send the code to me: ... I'm guessing the $Mime_Version is only getting Status:\n stuck into it. Then, your $headers string adds the extra \n which results in the following output you're showing... So, go take a look at the parts of your script where you set $Mime_Version and everything in that is used in the creation of that variable. Enjoy, --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- 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] Mail Headers problem.......
On Saturday 25 May 2002 01:29, CDitty wrote: I have looked at it and from what I understand, it should be working but it's not. Try plugging in fixed strings for your headers and see what results. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* A good name lost is seldom regained. When character is gone, all is gone, and one of the richest jewels of life is lost forever. -- J. Hawes */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Headers problem.......
On Fri, May 24, 2002 at 10:58:08AM -0500, CDitty wrote: if(IsSet($Mime_Version)){ $Mime_Version = MIME-Version: $Mime_Version\r\n; } Man, THINK! Did you set $Mime_Version anywhere in your code before this point? What happens here if $Mime_Version isn't set already? Then, remember what I pointed out before, about $Mime_version when you're using it in your header variable. Sorry to be snippy. We're here to help, not do your work for you. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Headers problem.......
I am writing a small email logging / forwarding script and am having problems with the headers. I am successfully getting the MIME-Version and Content-type, but when I insert them into the forwarded email message, the headers show within the email itself. Below is the code I am using. $to = $user_email[0]; $subj = $Subject; $msg = $Message; $headers = From: $From[1]\n; $headers .= $Mime_Version\n; $headers .= $Content_Type\n; mail($to, $subj, $msg, $headers); This is what the email looks like. Return-Path: mail Received: (from mail@localhost) by redhotsweeps.com (8.9.3/8.9.3) id VAA27003; Thu, 23 May 2002 21:23:51 -0500 Date: Thu, 23 May 2002 21:23:51 -0500 Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: test From: [EMAIL PROTECTED] Status: Content-type: text/plain; charset=us-ascii; format=flowed test 1234 Can anyone give me any tips? Thanks CDitty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Headers problem.......
dunno if this helps, but try using \r\n instead of just \n when you create $headers -Original Message- From: CDitty [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 1:20 PM To: [EMAIL PROTECTED] Subject: [PHP] Mail Headers problem... I am writing a small email logging / forwarding script and am having problems with the headers. I am successfully getting the MIME-Version and Content-type, but when I insert them into the forwarded email message, the headers show within the email itself. Below is the code I am using. $to = $user_email[0]; $subj = $Subject; $msg = $Message; $headers = From: $From[1]\n; $headers .= $Mime_Version\n; $headers .= $Content_Type\n; mail($to, $subj, $msg, $headers); This is what the email looks like. Return-Path: mail Received: (from mail@localhost) by redhotsweeps.com (8.9.3/8.9.3) id VAA27003; Thu, 23 May 2002 21:23:51 -0500 Date: Thu, 23 May 2002 21:23:51 -0500 Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: test From: [EMAIL PROTECTED] Status: Content-type: text/plain; charset=us-ascii; format=flowed test 1234 Can anyone give me any tips? Thanks CDitty -- 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] Mail Headers problem.......
Actually tried that earlier. No difference in the result. Chris At 10:48 PM 5/23/2002, you wrote: dunno if this helps, but try using \r\n instead of just \n when you create $headers -Original Message- From: CDitty [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 1:20 PM To: [EMAIL PROTECTED] Subject: [PHP] Mail Headers problem... I am writing a small email logging / forwarding script and am having problems with the headers. I am successfully getting the MIME-Version and Content-type, but when I insert them into the forwarded email message, the headers show within the email itself. Below is the code I am using. $to = $user_email[0]; $subj = $Subject; $msg = $Message; $headers = From: $From[1]\n; $headers .= $Mime_Version\n; $headers .= $Content_Type\n; mail($to, $subj, $msg, $headers); This is what the email looks like. Return-Path: mail Received: (from mail@localhost) by redhotsweeps.com (8.9.3/8.9.3) id VAA27003; Thu, 23 May 2002 21:23:51 -0500 Date: Thu, 23 May 2002 21:23:51 -0500 Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: test From: [EMAIL PROTECTED] Status: Content-type: text/plain; charset=us-ascii; format=flowed test 1234 Can anyone give me any tips? Thanks CDitty -- 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] Mail Headers problem.......
On Thu, May 23, 2002 at 10:19:51PM -0500, CDitty wrote: $to = $user_email[0]; $subj = $Subject; $msg = $Message; $headers = From: $From[1]\n; $headers .= $Mime_Version\n; $headers .= $Content_Type\n; You're not showing us how you come up with the $From[1], $Mime_Version and $Content_Type variables. I'm guessing the $Mime_Version is only getting Status:\n stuck into it. Then, your $headers string adds the extra \n which results in the following output you're showing... Subject: test From: [EMAIL PROTECTED] Status: Content-type: text/plain; charset=us-ascii; format=flowed test 1234 Later, --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Headers Formatting
Can someone tell me where to find documentation on defining mail headers and formatting? I've been to faqs.org, but was hoping to find something a bit more friendly. Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Headers Formatting
Nick, Thank you for your reply. I have looked at the RFC's and they are just too wordy without examples. I was hoping to find a nice hyperlinked html page with complete docs and examples...that may be hoping for too much:). I'll be using this to generate auto-responding email messages. I'd like to format them with the style of my website. I don't need too much, I just want to know what the capabilities are. Another programmer on the list said he would send me some code, so that should be a good starting point. Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Tuesday, February 19, 2002, at 02:08 PM, Nick Wilson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Steven Walker declared Can someone tell me where to find documentation on defining mail headers and formatting? I've been to faqs.org, but was hoping to find something a bit more friendly. Hi Steve, thought I'd reply offlist as my answer isn't really so hot and I'm intereted to see what others say. You need to look at the RFC? the email standard in general to get info on headers, I suggest a google search on 'request for comments' I'm sure you'll find the right place. What is it you want to do? If you just want to add some common ones to the mail() comand you do it buy specifying the fourth parameter like this: $extra=Reply-To: [EMAIL PROTECTED]; mail($to, $subj, $msg, $extra); HTH - -- - --- www.explodingnet.com |Projects, Forums and +Articles for website owners - -- Nick Wilson -- |and designers. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8cszQHpvrrTa6L5oRAkPzAJ9JzK+83hqYbDTrmFvU2RYUX8UksgCgljYz VKYLIO7w6YWU/ZEQS5MjiaE= =kNo8 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail headers
Hej! I have a question. I send mail from a php-script with the mail()-function. However the smtp server I use has a wrong time set. Can I set the sent-time through the headers so I take my web-servers time? and how then? Thankfull for help. /Kalle
[PHP] mail headers problem
I am using the HTML Email Class from Richard Heyes. Using the sendmail command I want to change the headers on the email so that the Return-Path is different from the To: data. The script looks like this: $mail-send( $row-firstname, $row-email, $newsletter_name, $newsletter_email, $newsletter_subject, 'Return-Path: [EMAIL PROTECTED]' ) It doesn't work! If I change 'Return-Path: [EMAIL PROTECTED]' to 'Reply-To: [EMAIL PROTECTED]' it does work. Any ideas? Regards, Matthew Delmarter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]