[PHP] Re: mail headers filtering
I like that ;-) Manuel Lemos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, On 09/30/2002 01:29 PM, Henry wrote: How about somebody making a javascript email encoder so that if you use a javascript enabled mail client it will get decoded only once it arrives with the recipient. With a link for those people without javascript enabled email clients to view the message remotely on a decode server if they wish. That won't work in many mail programs either because they do not support HTML mail or because they disable Javascript. Most Webmails even strip Javascript from the HTML. A more reliable alternative is to put a remote image in the HTML that is generated dynamically by PHP script that serves a static image after it records the identity of the user that read the message. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers filtering
Hi Chris They are having the problem receiving the mail sent by the script not sending. They go to my site and generate a form mailer using their email ad They upload it to their webserver Then they email me saying that they are testing the mailer out on their site and it seems to work but they never receive the email that it sends Always when I test the scripts (with my email ad) there is nothing wrong with it and I receive the mail So I don't know what to tell them apart from it must be filtering, nor do I know how to attempt to fix the problem. Maybe this problem of 'lost mail' is more noticeable to me because a few hundred a week use this generator so we are talking about running these scripts on a lot of different websites using a lot of different mailservers/mailboxes. From now on when I get these complaints I will ask them for the name of the mailserver that sends the mail - maybe then I can get back to you for some tests. Thanks Debbie - Original Message - From: Chris Hewitt [EMAIL PROTECTED] To: Debbie Dyer [EMAIL PROTECTED] Sent: Tuesday, October 01, 2002 8:48 AM Subject: Re: [PHP] Re: mail headers filtering Debbie Dyer wrote: I was talking about my second prob.. Debbie, I had not read your post well enough. Yes, if customers are sometimes having a similar problem when they are sending email then it could be their domain is not in dns. If I can help in a test, perhaps forwarding an email from you to an address you can't get through to directly, I'm happy to help. It will aid checking whether dns is the issue. I've only ever had one refusal to recieve email (except when the user no longer has the account) and that was when I sent an attachment that was a windows executable (.exe) file. Changing the extension to .zip and it went through. Not having had the problem, I disagree with you statement that email seems unreliable these days. So there must be something different with the setups we have that accounts for it. DNS is the only difference I can think of. Regards Chris PS I'm not on-line all the time, I pick up email every hour or two. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers filtering
Ah, so this is happening on another server. Both - mine and others. Does that server send emails OK other than by your script? Others - not known - the reason they use the generator (mostly) is because they dont know how to write the code themselves. But their webserver is running PHP and they have no reason to believe that it will not work. They say there is no error but I know that display errors is probably off. Are you using the mail() function or Manuel Lemos's classes and do you check the return value in your script to show whether it was delivered OK. mail() function - I am going to look at Manuels classes today. on the signup page to use the generator (where I sometimes have non-receipt of confirmation mail by user probs) - yes I check the return value on the generated scripts used on other peoples servers - no - I will change that for the next version of the generator re testing From your server or theirs? Using my server Check the logs of the server configured in php.ini to send the email (assuming you are using the emails services of the computer on which the php script is run). Dont think they will have access to these logs (most of them - me too - are running on providers servers not their own) Have you got Return-Path configured in all cases. The bounce messsage you posted would have been sent to you via this header. my signup page - no - I have configured reply-to instead which I thought was sufficient - I will change that generated scripts - no - I will change that for the next version I need to change a few things I can see that. At least now I will have more chance of finding out why and when I get complaints about non-receipt of emails I am better informed and in a better position to answer. Thank you very much for your help Chris. Debbie - Original Message - From: Chris Hewitt [EMAIL PROTECTED] To: Debbie Dyer [EMAIL PROTECTED] Sent: Tuesday, October 01, 2002 10:56 AM Subject: Re: [PHP] Re: mail headers filtering Debbie Dyer wrote: Hi Chris They are having the problem receiving the mail sent by the script not sending. They go to my site and generate a form mailer using their email ad They upload it to their webserver Then they email me saying that they are testing the mailer out on their site and it seems to work but they never receive the email that it sends Ah, so this is happening on another server. Does that server send emails OK other than by your script? Are you using the mail() function or Manuel Lemos's classes and do you check the return value in your script to show whether it was delivered OK. I suspect you don't. Always when I test the scripts (with my email ad) there is nothing wrong with it and I receive the mail From your server or theirs? So I don't know what to tell them apart from it must be filtering, nor do I Check the logs of the server configured in php.ini to send the email (assuming you are using the emails services of the computer on which the php script is run). If a linux box then its usually in the file /var/log/maillog. There will be information in there as to whether the email was sent without error. The sending will be to the recipient's mail host or dns MX record. The logs will indicate whether it got there without error or not. Whether the user can pick up mail from their mail host is another matter and not reported. At a minimun, the domain the email is originating from should be in both forward and reverse dns. know how to attempt to fix the problem. Maybe this problem of 'lost mail' is more noticeable to me because a few hundred a week use this generator so we are talking about running these scripts on a lot of different websites using a lot of different mailservers/mailboxes. Yes, quite possibly. smtp does not (I don't think) guarantee delivery but you should get either a MAILER_DAEMON bounce message to the address you configure in the Return-Path header or a line in the smtp server log to say why it has not been sent without error. Have you got Return-Path configured in all cases. The bounce messsage you posted would have been sent to you via this header. From now on when I get these complaints I will ask them for the name of the mailserver that sends the mail - maybe then I can get back to you for some tests. Yes, good idea. Check it is in both forward and reverse dns. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail headers filtering
Hi Debbie et.al. I think that we just have to accept that emails can no longer be relied upon. How about somebody making a javascript email encoder so that if you use a javascript enabled mail client it will get decoded only once it arrives with the recipient. With a link for those people without javascript enabled email clients to view the message remotely on a decode server if they wish. Henry Grech-Cini PS. If anybody does do this please let me know Debbie Dyer [EMAIL PROTECTED] wrote in message 020f01c26895$619cd880$8c093c3e@homepc">news:020f01c26895$619cd880$8c093c3e@homepc... 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
[PHP] Re: mail headers filtering
Jon Thanks but I already did all that - I first noticed it a while ago when people signing up on my site (and having to respond to a confirmation mail) were complaining that they never received the confirmation mail - not all people just a percentage. I tried manually emailing one of these email addresses and got it bounced back with the following:- X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.securesite7.com X-AntiAbuse: Original Domain - c-u-online.co.uk X-AntiAbuse: Originator/Caller UID/GID - [32116 32117] / [32116 32117] X-AntiAbuse: Sender Address Domain - server.securesite7.com and the subject Subject: Your E-Mail Did Not Make It. In other words mail trashed. I checked with my web providers who checked and came back to me saying they have checked and no they are not blackholed. Maybe this was due to a temporary blackhole I dont know but this isnt my only problem - there is a form mailer generator at my site and I keep getting complaints from ppl who use it saying they never receive the mails sent by the generated script - and this is when the scripts are using their mail servers - to be sure its not a fault with the script I always test them using a different email ad (to) and they work fine. Because of these problems I have done quite a bit of reading about mail filtering - one providers site actually stated that they will try to stop mails that they think are sent by scripts. Trouble is these filters work in different ways, content based filtering, header checking, using the services of ppl like spamcop etc. I was just wondering if there was anything I could do (with the header based filters) to make emails more likely to get through. Debbie - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'Debbie Dyer' [EMAIL PROTECTED] Sent: Monday, September 30, 2002 4:37 PM Subject: RE: mail headers filtering Hi Debbie, [offlist, from php-general] More and more emails seem to be getting blocked by mail filtering systems looking for spam (but trashing legitimate mail at the same time). [snip] I don't know if it arrived or if there were any replies due to my own provider blocking my mails Your ISP may be listed in a block list such as SPEWS (http://spews.org/), or you may be running an open relay on your network that's found its way into a similar list. You can check your mail servers' IPs by using the blackhole list check tool at Sam Spade: http://samspade.org/t/. do we just have to accept now that email can no longer be relied upon as a means of communication? You shouldn't have been doing this anyway, as it's not a reliable form of communication - if something's that important, send it through some sort of recorded mail. Shout if you need any help. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers filtering
Hi Henry I think that we just have to accept that emails can no longer be relied upon. - yes I know we all want to stop spam but when you rely on email to automate signups, speak to customers etc..it's a Good luck finding your javascript encoder Debbie - Original Message - From: Henry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 30, 2002 5:29 PM Subject: [PHP] Re: mail headers filtering Hi Debbie et.al. I think that we just have to accept that emails can no longer be relied upon. How about somebody making a javascript email encoder so that if you use a javascript enabled mail client it will get decoded only once it arrives with the recipient. With a link for those people without javascript enabled email clients to view the message remotely on a decode server if they wish. Henry Grech-Cini PS. If anybody does do this please let me know Debbie Dyer [EMAIL PROTECTED] wrote in message 020f01c26895$619cd880$8c093c3e@homepc">news:020f01c26895$619cd880$8c093c3e@homepc... 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers filtering
Debbie Dyer wrote: addresses and got it bounced back with the following:- X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.securesite7.com X-AntiAbuse: Original Domain - c-u-online.co.uk X-AntiAbuse: Originator/Caller UID/GID - [32116 32117] / [32116 32117] X-AntiAbuse: Sender Address Domain - server.securesite7.com Debbie, It may be dns related. Its one of the things that an anti-abuse program can easily check. Your c-u-online.co.uk translates to 64.46.107.4 so its in forward dns OK. Doing the reverse lookup, there is no answer (hostname): [g0pae@server g0pae]$ dig -x 64.46.107.4 ;; Got answer: ;; -HEADER- opcode: QUERY, status: SERVFAIL, id: 30427 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;4.107.46.64.in-addr.arpa.INPTR ;; Query time: 3911 msec ;; SERVER: 158.152.1.58#53(158.152.1.58) ;; WHEN: Mon Sep 30 18:45:51 2002 ;; MSG SIZE rcvd: 42 You should also have reverse dns set. I think this is probably your whole problem, but if not its a lot of it. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers filtering
Ok, thx Chris. I'll have to take that up with my providers. Maybe its the same problem for the others who've been contacting me re mails not arriving at their mailboxes too - next one who does I will ask them to check their dns as well. Debbie - Original Message - From: Chris Hewitt [EMAIL PROTECTED] To: Debbie Dyer [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 30, 2002 6:52 PM Subject: Re: [PHP] Re: mail headers filtering Debbie Dyer wrote: addresses and got it bounced back with the following:- X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.securesite7.com X-AntiAbuse: Original Domain - c-u-online.co.uk X-AntiAbuse: Originator/Caller UID/GID - [32116 32117] / [32116 32117] X-AntiAbuse: Sender Address Domain - server.securesite7.com Debbie, It may be dns related. Its one of the things that an anti-abuse program can easily check. Your c-u-online.co.uk translates to 64.46.107.4 so its in forward dns OK. Doing the reverse lookup, there is no answer (hostname): [g0pae@server g0pae]$ dig -x 64.46.107.4 ;; Got answer: ;; -HEADER- opcode: QUERY, status: SERVFAIL, id: 30427 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;4.107.46.64.in-addr.arpa.INPTR ;; Query time: 3911 msec ;; SERVER: 158.152.1.58#53(158.152.1.58) ;; WHEN: Mon Sep 30 18:45:51 2002 ;; MSG SIZE rcvd: 42 You should also have reverse dns set. I think this is probably your whole problem, but if not its a lot of it. Regards Chris -- 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] Re: mail headers filtering
Debbie Dyer wrote: mailboxes too - next one who does I will ask them to check their dns as Its a problem with the sender's domain, rather than the recipient. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail headers mail filtering
Hello, On 09/30/2002 11:09 AM, Debbie_dyer wrote: More and more emails seem to be getting blocked by mail filtering systems looking for spam (but trashing legitimate mail at the same Some people use anti-spam systems that give a lot of false positives due to criteria that make general assumptions of spam patterns. For instance, I know that some systems assume that HTML only messages are spam. The alternative is to compose HTML messages with text alternative version in the same message. I developed this class an enhanced it to the point that it could do that for messages that are sent as HTML. http://www.phpclasses.org/mimemessage Another situation is the temporary fault, like recipient SMTP server is too busy or the recipient is temporarily blocked or his mailbox is full. The usual procedure for this is to keep retrying for several days. Meanhwhile you do not know what is going on unless you inspect you sending server queue. That is not very practical. To avoid this problem, I developed a SMTP client class that implements direct delivery mode. That is a mode where instead of connecting to the local mailer to relay the messsage, the class connects to the recipient mail server and tries to deliver the message immediately. If there is an hard fault, like mailbox is full, or message rejection due to spam detection, you may be aware of it immediately. That class is located here but there is a wrapper for it using the class above. http://www.phpclasses.org/smtpclass 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? That was always true since the beginning of history of e-mail. The question for you is how do you want to handle that? Do you want to be aware when messages bounce or are refused for some reason ? -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail headers filtering
Hello, On 09/30/2002 01:29 PM, Henry wrote: How about somebody making a javascript email encoder so that if you use a javascript enabled mail client it will get decoded only once it arrives with the recipient. With a link for those people without javascript enabled email clients to view the message remotely on a decode server if they wish. That won't work in many mail programs either because they do not support HTML mail or because they disable Javascript. Most Webmails even strip Javascript from the HTML. A more reliable alternative is to put a remote image in the HTML that is generated dynamically by PHP script that serves a static image after it records the identity of the user that read the message. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail headers filtering
Hello, On 09/30/2002 01:42 PM, Debbie Dyer wrote: Jon Thanks but I already did all that - I first noticed it a while ago when people signing up on my site (and having to respond to a confirmation mail) were complaining that they never received the confirmation mail - not all people just a percentage. I tried manually emailing one of these email addresses and got it bounced back with the following:- X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.securesite7.com X-AntiAbuse: Original Domain - c-u-online.co.uk X-AntiAbuse: Originator/Caller UID/GID - [32116 32117] / [32116 32117] X-AntiAbuse: Sender Address Domain - server.securesite7.com Ah, your problem is simple and it is in your side. There is not reverse DNS record for c-u-online.co.uk IP address. Your system administrator needs to fix that. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail headers
Stalmannen [EMAIL PROTECTED] wrote in message 001f01c1b485$ea5dcb30$6900a8c0@web">news:001f01c1b485$ea5dcb30$6900a8c0@web... 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 --- Add this line to your headers string for the mail function: $headers .=Date: .date(r).\r\n; This should do it, provided your SMTP server allows you to set the Date: header. --Corey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail headers
Hi, i'm writte from Chile. If you writte to little php-script for send mail, what send you mail ?. I question you, because i'm writte a tipical php-script tell a friend, but i have problems with getenv(HTPP_REFERER), because send only my https fixed. Renato. Stalmannen ha escrito: 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers
On 13 Feb 2002 at 17:33, Renato Salvatore Moya L. wrote: Hi, i'm writte from Chile. If you writte to little php-script for send mail, what send you mail ?. I question you, because i'm writte a tipical php-script tell a friend, but i have problems with getenv(HTPP_REFERER), because send only my https fixed. Renato. Stalmannen ha escrito: 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? I would say no. I suggest setting the time on the mail server, or having the administrator do it. I am pretty sure the mail server is going to want to set that itself. Thankfull for help. /Kalle K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: mail headers
Renato, To send mail, use PHP's mail() function: mail($recipient,$subject,$message,$headers); You can reference $HTTP_REFERER directly without saying getenv(HTTP_REFERER) -Original Message- From: Renato Salvatore Moya L. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 2:34 PM To: [EMAIL PROTECTED]; Stalmannen Subject: [PHP] Re: mail headers Importance: High Hi, i'm writte from Chile. If you writte to little php-script for send mail, what send you mail ?. I question you, because i'm writte a tipical php-script tell a friend, but i have problems with getenv(HTPP_REFERER), because send only my https fixed. Renato. Stalmannen ha escrito: 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: mail headers
On 13 Feb 2002 at 14:40, Rick Emery wrote: Renato, To send mail, use PHP's mail() function: mail($recipient,$subject,$message,$headers); You can reference $HTTP_REFERER directly without saying getenv(HTTP_REFERER) Yeah, and if your mail function is being called within a function, just say: global $HTTP_REFERER; Hope that helps. -Original Message- From: Renato Salvatore Moya L. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 2:34 PM To: [EMAIL PROTECTED]; Stalmannen Subject: [PHP] Re: mail headers Importance: High Hi, i'm writte from Chile. If you writte to little php-script for send mail, what send you mail ?. I question you, because i'm writte a tipical php-script tell a friend, but i have problems with getenv(HTPP_REFERER), because send only my https fixed. Renato. Stalmannen ha escrito: 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers
ok gays, thank for all, but i try and no result good :-( look this : My PHP-Script : ? echo ' Prueba de Emailbr>'; echo ' Enviar esta pgina a un amigobr>'; $referer = getenv("HTTP_REFERERl"); mail ('[EMAIL PROTECTED]','Prueba de email',$referer); echo ' enviado..'; ?> Well this script i execute and the result is: Prueba de Email Enviar esta pgina a un amigo https://thorin.reuna.cl:1/init/edit_action.cgi?0+httpd enviado.. this is not my URL, so I need the URL that I am visiting Thank Renato "Keith V. (Vance Consulting LLC)" ha escrito: On 13 Feb 2002 at 14:40, Rick Emery wrote: > Renato, > > To send mail, use PHP's mail() function: > mail($recipient,$subject,$message,$headers); > > You can reference $HTTP_REFERER directly without saying getenv(HTTP_REFERER) Yeah, and if your mail function is being called within a function, just say: global $HTTP_REFERER; Hope that helps. > > -Original Message- > From: Renato Salvatore Moya L. [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 13, 2002 2:34 PM > To: [EMAIL PROTECTED]; Stalmannen > Subject: [PHP] Re: mail headers > Importance: High > > > Hi, i'm writte from Chile. If you writte to little php-script for send mail, > what send you mail ?. > > I question you, because i'm writte a tipical php-script " tell a friend", > but i have problems with "getenv(HTPP_REFERER)", because send only my https > fixed. > > Renato. > > Stalmannen ha escrito: > > > 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 General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: mail headers
$HTTP_REFERER is the address of the URL that you came from. If you want the URL that you are mailing from, then use $PHP_SELF try ? echo ' Prueba de Emailbr'; echo ' Enviar esta página a un amigobr'; $referer = getenv(HTTP_REFERER); mail ('[EMAIL PROTECTED]','Prueba de email',$referer); echo ' enviado..'; ? -Original Message- From: Renato Salvatore Moya L. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 3:17 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Rick Emery Subject: Re: [PHP] Re: mail headers Importance: High ok guys, thank for all, but i try and no result good :-( look this : My PHP-Script : ? echo ' Prueba de Emailbr'; echo ' Enviar esta página a un amigobr'; $referer = getenv(HTTP_REFERERl); mail ('[EMAIL PROTECTED]','Prueba de email',$referer); echo ' enviado..'; ? Well this script i execute and the result is: Prueba de Email Enviar esta página a un amigo https://thorin.reuna.cl:1/init/edit_action.cgi?0+httpd https://thorin.reuna.cl:1/init/edit_action.cgi?0+httpd enviado.. this is not my URL, so I need the URL that I am visiting Thank Renato Keith V. (Vance Consulting LLC) ha escrito: On 13 Feb 2002 at 14:40, Rick Emery wrote: Renato, To send mail, use PHP's mail() function: mail($recipient,$subject,$message,$headers); You can reference $HTTP_REFERER directly without saying getenv(HTTP_REFERER) Yeah, and if your mail function is being called within a function, just say: global $HTTP_REFERER; Hope that helps. -Original Message- From: Renato Salvatore Moya L. [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Wednesday, February 13, 2002 2:34 PM To: [EMAIL PROTECTED]; Stalmannen Subject: [PHP] Re: mail headers Importance: High Hi, i'm writte from Chile. If you writte to little php-script for send mail, what send you mail ?. I question you, because i'm writte a tipical php-script tell a friend, but i have problems with getenv(HTPP_REFERER), because send only my https fixed. Renato. Stalmannen ha escrito: 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 General Mailing List ( http://www.php.net/ http://www.php.net/ ) To unsubscribe, visit: http://www.php.net/unsub.php http://www.php.net/unsub.php K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net http://www.vanceconsulting.net [EMAIL PROTECTED]
Re: [PHP] Re: mail headers
You can't do a tell a firend script on the same page as your mail. 1. link all the pages you want to have mailed to a page that has a form on it. 2 on the page with the form you collect the info you want like the example below. Notice the hidden field. The form action passes the stuff off to the mail script mailfriend.php or what ever you name it. collect all the variable in the mail() script. form method=post action=mailfriend.php input type=hidden value=? echo($HTTP_REFERER);? name=url Friends Email: input type=text name=email size=25 br br Your Name: input type=text size=25 name=friend br br Your Email: input type=text size=25 name=referer br input type=submit name=Submit value=Submit HTH Gary Renato Salvatore Moya L. wrote: ah! ,i to me it forgot i try only $HTTP_REFERER and not result Renato Salvatore Moya L. ha escrito: ok gays, thank for all, but i try and no result good :-( look this : My PHP-Script : ? echo ' Prueba de Emailbr'; echo ' Enviar esta página a un amigobr'; $referer = getenv(HTTP_REFERERl); mail ('[EMAIL PROTECTED]','Prueba de email',$referer); echo ' enviado..'; ? Well this script i execute and the result is: Prueba de Email Enviar esta página a un amigo https://thorin.reuna.cl:1/init/edit_action.cgi?0+httpd enviado.. this is not my URL, so I need the URL that I am visiting Thank Renato Keith V. (Vance Consulting LLC) ha escrito: On 13 Feb 2002 at 14:40, Rick Emery wrote: Renato, To send mail, use PHP's mail() function: mail($recipient,$subject,$message,$headers); You can reference $HTTP_REFERER directly without saying getenv(HTTP_REFERER) Yeah, and if your mail function is being called within a function, just say: global $HTTP_REFERER; Hope that helps. -Original Message- From: Renato Salvatore Moya L. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 2:34 PM To: [EMAIL PROTECTED]; Stalmannen Subject: [PHP] Re: mail headers Importance: High Hi, i'm writte from Chile. If you writte to little php-script for send mail, what send you mail ?. I question you, because i'm writte a tipical php-script tell a friend, but i have problems with getenv(HTPP_REFERER), because send only my https fixed. Renato. Stalmannen ha escrito: 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php