RE: [PHP] Mail From option in PHP.ini
From the php website, it appears that the [EMAIL PROTECTED] can be put in the fifth parameter of the mail() function: Example 3. Sending mail with extra headers and setting an additional command line parameter. mail([EMAIL PROTECTED], the subject, $message, From: [EMAIL PROTECTED], [EMAIL PROTECTED]); Note: This fifth parameter was added in PHP 4.0.5. Since PHP 4.2.3 this parameter is disabled in safe_mode and the mail() function will expose a warning message and return FALSE if you're trying to use it. --- Brian S. Drexler [EMAIL PROTECTED] wrote: Yes, sorry...forgot to include that one...:-) -Original Message- From: M.A.Bond [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:31 AM To: 'sysadmin'; 'sven'; php-general Subject: RE: [PHP] Mail From option in PHP.ini I take it you've also tried setting Reply-To: ?? Same format as From: Mark -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: 18 July 2003 16:25 To: 'sven'; php-general Subject: RE: [PHP] Mail From option in PHP.ini No, I tried this too. Here is what I've tried $hdrs = array( 'From'= ''.$FullName.' '.$Email.'', 'Return-Path' = $Email, //'From'= $Email, //'Disposition-Notification-To' = ''.$FullName.' '.$Email.'', 'Disposition-Notification-To' = $Email, 'Return-Receipt-To' = '' .$FullName.' '.$Email.'', //'Return-Path' = $Email, 'Subject' = 'Your Quote # '.$Theresult ); The commented out ones were also tried -Original Message- From: sven [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:23 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Mail From option in PHP.ini ... and how about this? $headers .= Return-Path: $email_address_from_your_database\r\n; tell me, if it works. ciao SVEN Brian S. Drexler wrote: I tried the extra header. The problem is with the return receipts. The mail is being generated by a server other than my main e-mail server, so if I want a delivery/read receipt I have to specify a From e-mail address or else it will default to the user executing the script, i.e. [EMAIL PROTECTED] ini_set() does not appear to work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM group so it can only be set in the php.ini or httpd.conf...Thanks for the suggestion though... -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:09 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Mail From option in PHP.ini Ok, I want to specify who the mail is coming from by using the sendmail_path option in the PHP.ini. I've added the [EMAIL PROTECTED] to it, but I want to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else. Anyone have any ideas how I can do this? I'm pulling the e-mail I'd like to change it to from a MySQL database but can I rewrite the php.ini file on the fly or am I stuck. Any help is greatly appreciated. Why not just put it in the extra headers? $headers .= From: $email_address_from_your_database\r\n; Or you could possibly use ini_set() to change the php.ini setting. ---John Holmes... -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail From option in PHP.ini
GREAT!!! I guess I need to RTFM...:-) Thanks again for all your help everyone! -Original Message- From: Mark [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:38 AM To: [EMAIL PROTECTED]; 'M.A.Bond'; 'sven'; 'php-general' Subject: RE: [PHP] Mail From option in PHP.ini From the php website, it appears that the [EMAIL PROTECTED] can be put in the fifth parameter of the mail() function: Example 3. Sending mail with extra headers and setting an additional command line parameter. mail([EMAIL PROTECTED], the subject, $message, From: [EMAIL PROTECTED], [EMAIL PROTECTED]); Note: This fifth parameter was added in PHP 4.0.5. Since PHP 4.2.3 this parameter is disabled in safe_mode and the mail() function will expose a warning message and return FALSE if you're trying to use it. --- Brian S. Drexler [EMAIL PROTECTED] wrote: Yes, sorry...forgot to include that one...:-) -Original Message- From: M.A.Bond [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:31 AM To: 'sysadmin'; 'sven'; php-general Subject: RE: [PHP] Mail From option in PHP.ini I take it you've also tried setting Reply-To: ?? Same format as From: Mark -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: 18 July 2003 16:25 To: 'sven'; php-general Subject: RE: [PHP] Mail From option in PHP.ini No, I tried this too. Here is what I've tried $hdrs = array( 'From'= ''.$FullName.' '.$Email.'', 'Return-Path' = $Email, //'From'= $Email, //'Disposition-Notification-To' = ''.$FullName.' '.$Email.'', 'Disposition-Notification-To' = $Email, 'Return-Receipt-To' = '' .$FullName.' '.$Email.'', //'Return-Path' = $Email, 'Subject' = 'Your Quote # '.$Theresult ); The commented out ones were also tried -Original Message- From: sven [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:23 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Mail From option in PHP.ini ... and how about this? $headers .= Return-Path: $email_address_from_your_database\r\n; tell me, if it works. ciao SVEN Brian S. Drexler wrote: I tried the extra header. The problem is with the return receipts. The mail is being generated by a server other than my main e-mail server, so if I want a delivery/read receipt I have to specify a From e-mail address or else it will default to the user executing the script, i.e. [EMAIL PROTECTED] ini_set() does not appear to work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM group so it can only be set in the php.ini or httpd.conf...Thanks for the suggestion though... -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:09 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Mail From option in PHP.ini Ok, I want to specify who the mail is coming from by using the sendmail_path option in the PHP.ini. I've added the [EMAIL PROTECTED] to it, but I want to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else. Anyone have any ideas how I can do this? I'm pulling the e-mail I'd like to change it to from a MySQL database but can I rewrite the php.ini file on the fly or am I stuck. Any help is greatly appreciated. Why not just put it in the extra headers? $headers .= From: $email_address_from_your_database\r\n; Or you could possibly use ini_set() to change the php.ini setting. ---John Holmes... -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() sending mails twice to the e-mails addresses at BCC
Hi there! As I explained yesterday I am developing a group of pages to let users send mails from them. For that I am using the mail() function. The problem I face is that the addresses I write at the BCC field receive mails twice (not the one at the To: field, just the ones at the BCC:). It only happens when I use mail(). Following the advice of the people on the list I installed phpmailer. Using it I don't have that problem, it only happens when I use mail() alone And it only happens with the addresses at BCC. I've checked the logs of the mail server and I see how the pages send the RCPT TO so many times... so it's not a problem of the mail server. I am using Windows ME with PHP Version 4.3.1. Do you know if it's a bug of that version? Also, is there any way to keep track of what PHP is doing? To make it display on the pages or somewhere else what on earth is it doing to send those mails twice Thanks.. Kisses, Maria __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail()
Hi, I've made a script that loops through a MySQL database and sends a message to all users with an email address on file. My client is now not certain if all their email addresses are accurate and would like to know which ones are and which ones are not. Is there a way, using mail() to tell if an email was not sent to a specified address? I'm on a shared server, so I don't have access to logs other than the standard ones from apache for web tracking. We're using PHP 4.3.0, MySQL 4.0.13, and Apache 1.3.26 Thanks -Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail()
mail() returns true if the email delivery worked, false if it failed. However, occasionally the email delivery will work, but will fail at a later stage (a delivery failed message will be returned to the sender) - you can check for this by having a script check the mailbox that was sent from, and get all delivery failed messages. parse them for the email address and then you will know that it failed. jasp Tim Thorburn wrote: Hi, I've made a script that loops through a MySQL database and sends a message to all users with an email address on file. My client is now not certain if all their email addresses are accurate and would like to know which ones are and which ones are not. Is there a way, using mail() to tell if an email was not sent to a specified address? I'm on a shared server, so I don't have access to logs other than the standard ones from apache for web tracking. We're using PHP 4.3.0, MySQL 4.0.13, and Apache 1.3.26 Thanks -Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() - how to attach file to the message???
i know that in mail-form i need input type=file name=attach but i don't know how to write message headers to send file with e-mail. please help me. szparag. IncrediMail - Email has finally evolved - Click Here
Re: [PHP] mail() - how to attach file to the message???
Use this class: http://www.phpclasses.org/mimemessage szparag wrote: i know that in mail-form i need input type=file name=attach but i don't know how to write message headers to send file with e-mail. please help me. szparag. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() - how to attach file to the message???
this worked for me but i did some editing and censoring oso maybe a tiny bug got in. ///SETUP strings $subject='hi there, this is not a Viagra business proposal, '; $mailto = '[EMAIL PROTECTED],[EMAIL PROTECTED]';// for multiple recipients, use comma '[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]' $From = 'Your website' [EMAIL PROTECTED]'; // gets shown as mail sender. can be anything. $message = \nThis is a backup created by a script on your site. \nThe location of the script is .__FILE__.'.'; $filedata = getyourcontentsomehow(); //create a filename for the email. the date and time at the start of the filename make it easy to sort it. $filename = date(Y_m_d__H_i).'anytext'..sql; //prepare mail body $filedata = chunk_split(base64_encode($filedata)); $type = application/octet-stream; $encoding = base64; mt_srand((double)microtime()*100); $boundary = '--b'.md5(uniqid(mt_rand())) . getmypid(); //as long as it starts with -- it should work $mailbody = From: Your website script\n .MIME-Version: 1.0\n .Content-Type: multipart/mixed; boundary=\$boundary\\n\n .This is a MIME encoded message. \n\n .--$boundary\n .Content-Type: text/plain\n; .Content-Transfer-Encoding: 8bit\n\n .$message . \n\n\n--$boundary; $data = Content-Type: $type.; name = \$filename\\n .Content-Transfer-Encoding: $encoding .\n\n$filedata\n; $mailbody .= \n$data\n--$boundary .--\n; //send mail mail($mailto, $subject , ' ', $mailbody) or die ('Could not send email!'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Header/Return Receipt
Ok, I have an interesting one here. I'm trying to send an e-mail from Server A, through Server B, and to a recipient using PHP on Server A. Server B relays the e-mail because Server A does not have an internet connection. Now, I want to request a read/delivery receipt for the user sending the mail but if I specify the Disposition-Notification-To: Header the mail fails to deliver because the username/domain that Server A is executing the script with comes through. I don't know if this makes any sense but here is some stuff from the logs This is from the server the mail is being sent to(Recipient Server) Jul 8 13:32:13 www sendmail[26808]: h68HWCY26808: ruleset=check_mail, arg1=[EMAIL PROTECTED], relay=ServerB.myDomain.com [64.113.42.5], reject=501 5.1.8 [EMAIL PROTECTED]... Domain of sender address [EMAIL PROTECTED] does not exist Jul 8 13:32:13 www sendmail[26808]: h68HWCY26808: from=[EMAIL PROTECTED], size=256213, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=ServerB.myDomain.com [64.113.42.5] This is from Server A: Jul 8 12:43:48 ServerA sendmail[31361]: MAA31361: from=uucp, size=256011, class=0, pri=286011, nrcpts=1, msgid=[EMAIL PROTECTED], [EMAIL PROTECTED] Jul 8 12:43:49 ServerA sendmail[31363]: MAA31361: [EMAIL PROTECTED], ctladdr=uucp (10/14), delay=00:00:01, xdelay=00:00:01, mailer=smtp, relay=ServerB.myDomain.com. [206.162.111.100], stat=Sent (2.0.0 h68GhoQ18448 Message acc epted for delivery) This is from Server B: Jul 8 12:43:56 ServerB sendmail[18450]: h68GhoQ18448: to=[EMAIL PROTECTED], delay=00:00:06, xdelay=00:00:05, mailer=esmtp, pri=286213, relay=mail.recipient.com. [64.113.39.156], dsn=5.6.0, stat=Data format error Jul 8 12:43:56 ServerB sendmail[18450]: h68GhoQ18448: h68GhuQ18450: DSN: Data format error Jul 8 12:43:57 ServerB sendmail[18450]: h68GhuQ18450: to=[EMAIL PROTECTED], delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=286313, relay=ServerA.myDomain.com. [206.162.111.97], dsn=2.0.0, stat=Sent (MAA31368 Message accepted for delivery) Any help would be greatly appreciated.Thanks in advance! Brian Here is my code also: (I'm using PEAR Mail and MIME) $FullName=$r[FullName]; $Email=$r[Email]; $ConfirmVia=$r[ConfirmVia]; $ConfirmTo=$r[ConfirmTo]; if($ConfirmVia==Email || $ConfirmVia==EMail) { $file=/tmp/Quote.$Theresult..pdf; system(ps2pdf $filename $file); //This is the part that actually sends the mail include('Mail.php'); include('Mail/mime.php'); $text = 'The quote that you requested is attached. Thank you for the opportunity to quote your enclosure needs!\n\n'.$FullName.'\n'.$Email; $html = 'htmlbodyfont face=\Arial\The quote that you requested is attached. Thank you for the opportunity to quote your enclosure needs!brbr'.$FullName.'br'.$Email.'/font/body/html'; $crlf = \r\n; $hdrs = array( 'From'= $Email, 'Subject' = 'Your Quote # '.$Theresult, 'Disposition-Notification-To' = $Email, 'Return-Path' = $Email ); $mime = new Mail_mime($crlf); $mime-setTXTBody($text); $mime-setHTMLBody($html); //$mime-addAttachment($file, 'text/plain'); $mime-addAttachment($file); $body = $mime-get(); $hdrs = $mime-headers($hdrs); $mail = Mail::factory('mail'); $mail-send($ConfirmTo, $hdrs, $body); //End mail part system(rm -f $file); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Header/Return Receipt
Disposition-Notification-To: is not a sure bet, since the majority of people ignore the return receipt. The only way you will know if the email address is invalid is when the email bounces back and the server sends you the error message. At this point you can have a script check the email server spool file for bounced messages containing invalid email addresses. If are running an in-house web server, one way you can check if the user received the email, rather than attaching the pdf file to the email, generate and keep the pdf file on your web server. Then on the email give them a link to your web server where they can download the file. But instead of linking straight to the pdf file, use a download script that will check what file is being downloaded and then report this back to you. Something like: http://www.mydomain.com/download.php?file=Quote.pdf If you must attach the file to the email, then another method would be to include an IMG tag in the email message, so when the recipient opens up the email IMG will call out a script on your server which will track the users email address and then report this back to you. Something like: IMG SRC=http://www.mydomain.com/[EMAIL PROTECTED] WIDTH=1 HEIGHT=1 BORDER=0 -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 11:19 AM To: 'Ralph Guzman' Subject: RE: [PHP] Mail Header/Return Receipt That is a good idea. I can tell them it has at least been sent from our server, but what if the e-mail address they are sending it to is not valid? I'd like for them to know if it fails. I'll figure it out. When I do I'll let you know what I did. Thanks for all the help and suggestions! Brian -Original Message- From: Ralph Guzman [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 2:12 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Mail Header/Return Receipt once the email is sent out, can't you simply have your script send the user a receipt? If you must use Disposition-Notification-To: for the receipt then I think you will have to figure how to do this on the email server level. Afterall, the script is doing what it's supposed to. -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 10:47 AM To: 'Ralph Guzman' Subject: RE: [PHP] Mail Header/Return Receipt I can't. Server A has a printer driver installed that calls some PHP functions. It takes the title tag from a Postscript file sent to the printer and gets some information from a different machine running MySQL on our network. Depending on this information it may fax the postscript file using HylaFAX or e-mail it. If it is going to e-mail then it then takes that information (e-mail address, to and from, phone number, etc.) and creates an HTML e-mail and a PDF file and e-mail's them. It works pretty well for us and it makes it simple for the people using the application. All they do is print the report to a default printer and it does all the work for them. With the faxes it will e-mail them a confirmation if it fails or not, and that's what I'm trying to get the e-mail to do (quite unsuccessfully I might add). Good thought though. Any other ideas? -Original Message- From: Ralph Guzman [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 1:41 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Mail Header/Return Receipt What if you run the script from server b? -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 10:33 AM To: 'Ralph Guzman' Subject: RE: [PHP] Mail Header/Return Receipt Ok, I wasn't sure if it was a simple header tag that I was missing or something like that. Thanks though... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() function
Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1Àå]Ãö¼': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1Àå]Ãö¼': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function
Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function
I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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() function
I've gotten that error message when running PHP from the command line. The script still works even though it gives me that error though. If anyone figures out what it's from or how to fix it I'd be interested in their solution. -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function
Can you run a regular phpinfo() command? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function
Never really thought about that, but the perms are set at 644 for the script trying to do the actual function. I ran the command to find the version at command line, but the script that sends mail is part of a web site (so I am running it through my browser). -Mike -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:06 PM To: 'Mike At Spy' Subject: RE: [PHP] mail() function I assume you are running this on the command line. Does the file have the correct permissions? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function
They have it set to Show all errors except for notices. -Mike -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:18 PM To: 'Mike At Spy' Subject: RE: [PHP] mail() function Ok, so if it is a command line issue it's not the problem you are having with the mail script. Does it give you any sort of error from the browser or are the errors turned off in the php.ini? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:17 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function Never really thought about that, but the perms are set at 644 for the script trying to do the actual function. I ran the command to find the version at command line, but the script that sends mail is part of a web site (so I am running it through my browser). -Mike -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:06 PM To: 'Mike At Spy' Subject: RE: [PHP] mail() function I assume you are running this on the command line. Does the file have the correct permissions? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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 -- 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()
On Saturday 05 July 2003 02:57, Phil Dowson wrote: Could someone let me know if it is possible to pass a resultset of a query to a single variable so it can be included as the message part of the mail function? Short answer: yes Long answer: what exactly are you trying to do and what exactly do you need help on? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I was born in a Hostess Cupcake factory before the sexual revolution! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail()
Could someone let me know if it is possible to pass a resultset of a query to a single variable so it can be included as the message part of the mail function? if I were you I would try something like... ?php $result = mysql_query($query); $email = NULL; // it's bad form to dot without clearing the variable while ($line = mysql_fetch_array($result,MYSQL_ASSOC)) { $email = $email . Value 1: {$line['value_1']}\n; $email = $email . Value 2: {$line['value_2']}\n; $email = $email . Value 3: {$line['value_3']}\n; // ... } mail('[EMAIL PROTECTED]','subject',$email); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail()
Perfect solution. Thanks!!! - Original Message - From: Dan Anderson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 05, 2003 4:30 am Subject: Re: [PHP] mail() Could someone let me know if it is possible to pass a resultset of a query to a single variable so it can be included as the message part of the mail function? if I were you I would try something like... ?php $result = mysql_query($query); $email = NULL; // it's bad form to dot without clearing the variable while ($line = mysql_fetch_array($result,MYSQL_ASSOC)) { $email = $email . Value 1: {$line['value_1']}\n; $email = $email . Value 2: {$line['value_2']}\n; $email = $email . Value 3: {$line['value_3']}\n; // ... } mail('[EMAIL PROTECTED]','subject',$email); ? -- 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
[PHP] mail()
Hi, Could someone let me know if it is possible to pass a resultset of a query to a single variable so it can be included as the message part of the mail function? Thanks! Phil Dowson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail + regex + somethoughts
Hi, Shivanischal A [EMAIL PROTECTED] wrote: Hi friends, I was just wondering about this. Whenver we reply to the posts here, we just click on the reply button and fire off our messages. This results in long messages (fresh content + earlier content) within a single mail. Now, the question is how would we use the regex functions to remove the older content from a fresh mail. I think you all beginning to get the picture. What would we do if we want just the responses/comments to an earlier and not the earlier mail verbatim in the fresh one? Copy - Paste and/or Highlight - Delete ? - E - ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() with OSX
It has sendmail installed but you need to look into activating it as it is not enabled by default (I don't know how off the bat, but google should help) Hope this helps On 07/02/03 11:07 PM, Justin French [EMAIL PROTECTED] wrote: Hi all, I've googled, but to no avail... I have apache 1.3.x, php 4.3.2 and mysql on my new g4 under OSX 10.2.6, and most stuff seems to be working fine, but i just did a test using mail() and it didn't work out... no error in the apache log, no error on the screen. Obviously PHP can't find sendmail... Where should I be looking (httpd.conf? php.ini?), what should it be set to? Does OSX even HAVE sendmail straight out of the box? TIA Justin -Mike __ Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! __ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail + regex + somethoughts
Hi friends, I was just wondering about this. Whenver we reply to the posts here, we just click on the reply button and fire off our messages. This results in long messages (fresh content + earlier content) within a single mail. Now, the question is how would we use the regex functions to remove the older content from a fresh mail. I think you all beginning to get the picture. What would we do if we want just the responses/comments to an earlier and not the earlier mail verbatim in the fresh one? Sorry if this has already been answered; I'l look once more Thanks Regards, -shiva -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() with OSX
Excellent -- found it straight away! http://www.roadstead.com/weblog/Tutorials/SMSource.html Thx Justin On Thursday, July 3, 2003, at 02:12 PM, Michael Mulligan wrote: It has sendmail installed but you need to look into activating it as it is not enabled by default (I don't know how off the bat, but google should help) Hope this helps On 07/02/03 11:07 PM, Justin French [EMAIL PROTECTED] wrote: Hi all, I've googled, but to no avail... I have apache 1.3.x, php 4.3.2 and mysql on my new g4 under OSX 10.2.6, and most stuff seems to be working fine, but i just did a test using mail() and it didn't work out... no error in the apache log, no error on the screen. Obviously PHP can't find sendmail... Where should I be looking (httpd.conf? php.ini?), what should it be set to? Does OSX even HAVE sendmail straight out of the box? TIA Justin -Mike __ Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! __ --- [This E-mail scanned for viruses] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MAIL( ) - Send mail using another SMTP
Hello Everybody, I don't have sendmail/qmail on my web server where i installed PHP. But I want to send mails from web server using PHP. Can anybody tell me, how can i use another SMTP server to send mails? I don't like to change php.ini on my web server. Thank You, - Chinmoy __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() without subjects and froms
Hi there! I have a weired problem with a 4.12 php version on win2k. When i mail more then one email i often have the problem that the mail reaches their recipient but the subject and from does not work properly, instead this is on top of the email. but strangely sometimes it just works normal. does someone know the reason for such empty subject mails? - Johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() without subjects and froms
Hello, This is a reply to an e-mail that you wrote on Fri, 20 Jun 2003 at 16:40, lines prefixed by '' were originally written by you. Hi there! I have a weired problem with a 4.12 php version on win2k. When i mail more then one email i often have the problem that the mail reaches their recipient but the subject and from does not work properly, instead this is on top of the email. but strangely sometimes it just works normal. does someone know the reason for such empty subject mails? - Johannes When you call the mail() function are you using the headers parameter, if so have you accidentally put a double newline in your headers, if so this would cause all of the headers below the double newline to appear in the body. David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() without subjects and froms
Hello, This is a reply to an e-mail that you wrote on Fri, 20 Jun 2003 at 17:44, lines prefixed by '' were originally written by you. Hi! I guess i do not make any weired things, the configuration looks like this: mail($mail, $message, From: [EMAIL PROTECTED][EMAIL PROTECTED]); Looks like you are passing the parameters in the wrong order, it should be: mail([EMAIL PROTECTED],subject,message,From: Yourname [EMAIL PROTECTED]); Read this for more info: http://uk.php.net/manual/en/function.mail.php HTH David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail() problem
Hi Don, ?php $cmd='/bin/sh -c set'; passthru($cmd); echo 'P'; putenv(REMOTE_ADDR=$REMOTE_ADDR); passthru($cmd); echo 'P'; ? This code will work, but I want to be able to enforce it on people that use the mail() function. I want php to call sendmail (The one from php.ini that is) WITH this environment variabele still set. Maybe my initial post wasn't that clear on this :) Don Read [EMAIL PROTECTED] Kind regards, Maikel Verheijen.
Re: [PHP] Mail() problem
On 10-Jun-2003 Maikel Verheijen wrote: snip Unfortunately php does NOT pass on these environment variabeles to the program that gets called as the mail-program (In my case my mini-sendmail). This renders this little spamfinder trick unusable, which is too bad :( If someone has a clue/trick for me on how to enable this, I would be really gratefull! ?php $cmd='/bin/sh -c set'; passthru($cmd); echo 'P'; putenv(REMOTE_ADDR=$REMOTE_ADDR); passthru($cmd); echo 'P'; ? --- output wrapped: HOME=/ PS1='$ ' OPTIND=1 PS2=' ' PPID=2612 PATH=/sbin:/bin:/usr/sbin:/usr/bin IFS=' ' REMOTE_ADDR=127.0.0.2 HOME=/ PS1='$ ' OPTIND=1 PS2=' ' PPID=2614 PATH=/sbin:/bin:/usr/sbin:/usr/bin IFS=' ' Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail() and html
Good Morning, Hopefully I'm not asking questions that are too basic. I am new to this list and new to PHP. If my questions are too basic please let me know and I'll direct them elsewhere. I'm at a very basic level with PHP. I'm working with form data and sending the information out in emails. That is not a problem. What I would like to do is send out an email with the information from the form in html format. I've seen many examples and the one below works fine for me. But I would like to be able to add a body tag to $mailbody below so I can color the background of the html page that is being sent out via email. Can someone explain to me what I have to add to the following to make this happen? Thanks, Greg This works but I can't change the background color of the html email: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleUntitled Document/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body ?php print Hello there; $to = [EMAIL PROTECTED]; // Where the e-mail is sending to. $subject = This Is A Test!; // The subject of the e-mail. $name = Greg Landry; // Your name, the from name. $email = [EMAIL PROTECTED]; // Your e-mail, the from address. $mailbody = hrTesthrBrBrimg src=\ http://www.portcityportlandmaine.com/php/clients.jpg\ $name'http://www.portcityportlandmaine.com/php/clients.jpg\;Brbr$name ; mail($to, $subject, $mailbody, From: $name $email\n . MIME-Version: 1.0\n . Content-type: text/html; charset=iso-8859-1); ? /body /html
RE: [PHP] Mail() and html
Got it! Thanks... -Original Message- From: gregory landry [mailto:[EMAIL PROTECTED] Sent: Saturday, June 14, 2003 6:23 AM To: PHP Mail List Subject: [PHP] Mail() and html Good Morning, Hopefully I'm not asking questions that are too basic. I am new to this list and new to PHP. If my questions are too basic please let me know and I'll direct them elsewhere. I'm at a very basic level with PHP. I'm working with form data and sending the information out in emails. That is not a problem. What I would like to do is send out an email with the information from the form in html format. I've seen many examples and the one below works fine for me. But I would like to be able to add a body tag to $mailbody below so I can color the background of the html page that is being sent out via email. Can someone explain to me what I have to add to the following to make this happen? Thanks, Greg This works but I can't change the background color of the html email: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleUntitled Document/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body ?php print Hello there; $to = [EMAIL PROTECTED]; // Where the e-mail is sending to. $subject = This Is A Test!; // The subject of the e-mail. $name = Greg Landry; // Your name, the from name. $email = [EMAIL PROTECTED]; // Your e-mail, the from address. $mailbody = hrTesthrBrBrimg src=\ http://www.portcityportlandmaine.com/php/clients.jpg\ $name'http://www.portcityportlandmaine.com/php/clients.jpg\;Brbr$name ; mail($to, $subject, $mailbody, From: $name $email\n . MIME-Version: 1.0\n . Content-type: text/html; charset=iso-8859-1); ? /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail() problem
Hi list, Has anyone ever tried to use REMOTE_ADDR to be sent along with emails sent from php-scripts that use the mail() function? I have built a small auto-relaying sendmail (crudely based on mini-sendmail, http://www.acme.com/software/mini_sendmail/) that adds a received header containing the poster's ip-address. Unfortunately php does NOT pass on these environment variabeles to the program that gets called as the mail-program (In my case my mini-sendmail). This renders this little spamfinder trick unusable, which is too bad :( If someone has a clue/trick for me on how to enable this, I would be really gratefull! Kind regards, Maikel Verheijen.
[PHP] Mail Username
I know that if you use sendmail to perform your mailings in php that the sender shows up as the user and group for Apache. Now is there a way to make the mail command display a different user in the from field? I know that I could change the user/group for Apache to fix it, but is there a setting in the PHP.conf file to change this. Will I be better off using pop and smtp and just point it to my local box? Thanks Josh Thomas www.kickbackpoints.com
Re: [PHP] Mail Username
You can add extra info into the appropriate fields like so. mail([EMAIL PROTECTED], the subject, $message, From: [EMAIL PROTECTED],[EMAIL PROTECTED]); However, your local sendmail might restrict this behavoir of changing the sender identity. Mine simply complaines about it in the mail logs, but does change the from information like I wish. Look here for more details: http://us2.php.net/manual/en/function.mail.php On Tue, 10 Jun 2003, Josh Thomas wrote: -I know that if you use sendmail to perform your mailings in php that the -sender shows up as the user and group for Apache. Now is there a way to make -the mail command display a different user in the from field? I know that I -could change the user/group for Apache to fix it, but is there a setting in -the PHP.conf file to change this. Will I be better off using pop and smtp -and just point it to my local box? - -Thanks -Josh Thomas -www.kickbackpoints.com - ** John Huggins [EMAIL PROTECTED] http://www.phphosts.com/ ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() function exchange
Hi php-general, a friend of mine is trying to set up an automated mailing function. The platform is Windows he's using the last PHP release at this time. He asks me how to do it with Exchange, because it doesn't speak SMTP or not correctly? What is the matter? Is that true? But that's not really the question... could somebody point me to some documents where I could find out, what has to be done to make it work? Thanks M. PS: On the manual page of http://www.php.net I couldn't find anything about php exchange... -- Who is the ennemy? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem affecting output to browser on completion
Alright with the following code I am using is printing/echoing to the browser a 1 before the html output. It's like it's adding 2 variables together. Here is what I am trying to do. I have a form that enters information to a text file, and at the same time sends the information to a predetermined email address. This email example is one that I made up on my server, but will work for this example. I need it to stop printing the number 1 before the rest of the page's output. $address = [EMAIL PROTECTED]; $subject = Your Feedback Page has been submitted\n; $body = The following is the information that was entered.br\r\n; $body .= Message Type: $messageTypebr\r\n; $body .= Subject: $subjectbodybr\r\n; $body .= Other Subject: $otherSubjectbr\r\n; $body .= Comments: $commentsbr\r\n; $body .= User Name: $usernamebr\r\n; $body .= Email Address: $emailbr\r\n; $body .= Telephone Number: $telephonebr\r\n; $body .= Fax Number: $faxbr\r\n; $body .= Contact Option: $contactbr\r\n; $moreheaders = From: [EMAIL PROTECTED]: text/html\n; $send = mail($address, $subject, $body, $moreheaders); echo $send; I noticed that the 1 is being entered in right as I call the Print command or in this case echo (I have tried using 'print $send' aswell). Knowing this doesn't solve my issue as all the echo/print command does in general is to start referencing my variables from earlier within the same script. Also if you need the whole script I can send that aswell. The part right here is what's bugging me,because if I take this out of the script, it works fine, just doesn't send an email but it still writes to the text fine and then displays without the 1, the problem is somewhere in this script section. I'm assuming, hehe Any help would be much appreciated. Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() problem affecting output to browser on completion
Alright with the following code I am using is printing/echoing to the browser a 1 before the html output. It's like it's adding 2 variables together. Here is what I am trying to do. I have a form that enters information to a text file, and at the same time sends the information to a predetermined email address. This email example is one that I made up on my server, but will work for this example. I need it to stop printing the number 1 before the rest of the page's output. $address = [EMAIL PROTECTED]; $subject = Your Feedback Page has been submitted\n; $body = The following is the information that was entered.br\r\n; $body .= Message Type: $messageTypebr\r\n; $body .= Subject: $subjectbodybr\r\n; $body .= Other Subject: $otherSubjectbr\r\n; $body .= Comments: $commentsbr\r\n; $body .= User Name: $usernamebr\r\n; $body .= Email Address: $emailbr\r\n; $body .= Telephone Number: $telephonebr\r\n; $body .= Fax Number: $faxbr\r\n; $body .= Contact Option: $contactbr\r\n; $moreheaders = From: [EMAIL PROTECTED]: text/html\n; $send = mail($address, $subject, $body, $moreheaders); echo $send; Why are you echoing $send? If mail() succeeds, it returns 1 (TRUE), which is assigned to $send, which you then print. The script is doing exactly what you tell it to do. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail - avoid backslash before apostrophe
I have a text box on a web page and submit button. The php code sends the text as an email. If the text includes an inverted comma/apostrophe the email will include a backslash before it, thus: \'. I know how to str_replace in php, but what do I need to replace the apostrophe with to avoid the \? The HTML for ' is #39; if that helps. I've looked at ASCII in google, but am unenlightened. Can't find the answer in php.net under mail() function either. John http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail - avoid backslash before apostrophe
Umm, try this: $body = str_replace('\'','#39;',stripslashes($_POST['message'])); mail($to,$subject,$body,Content-type:text/html\r\n); On Mon, 2003-06-02 at 11:12, Dillon, John wrote: I have a text box on a web page and submit button. The php code sends the text as an email. If the text includes an inverted comma/apostrophe the email will include a backslash before it, thus: \'. I know how to str_replace in php, but what do I need to replace the apostrophe with to avoid the \? The HTML for ' is #39; if that helps. I've looked at ASCII in google, but am unenlightened. Can't find the answer in php.net under mail() function either. John http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail - avoid backslash before apostrophe
Hi there, I think you need to check magic quotes setting under php.ini. I guess it should be on. Try to make it off and try your mail function. Thanks Hardik Doshi --- Dillon, John [EMAIL PROTECTED] wrote: I have a text box on a web page and submit button. The php code sends the text as an email. If the text includes an inverted comma/apostrophe the email will include a backslash before it, thus: \'. I know how to str_replace in php, but what do I need to replace the apostrophe with to avoid the \? The HTML for ' is ' if that helps. I've looked at ASCII in google, but am unenlightened. Can't find the answer in php.net under mail() function either. John http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail - avoid backslash before apostrophe
You have magic_quotes on, with this setting php runs addslashes() on every $_REQUEST variable (so you can use them in sql queries right away). So you need to use stripslashes() before sending it as mail. Dillon, John wrote: I have a text box on a web page and submit button. The php code sends the text as an email. If the text includes an inverted comma/apostrophe the email will include a backslash before it, thus: \'. I know how to str_replace in php, but what do I need to replace the apostrophe with to avoid the \? The HTML for ' is #39; if that helps. I've looked at ASCII in google, but am unenlightened. Can't find the answer in php.net under mail() function either. John http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Harvester Warning (was Re: [PHP] I guess I'll give the list a shot [T2003060200WW])
Just wanted to pass a little warning on to the list. I sent a reply to David McGlone ([EMAIL PROTECTED]) and my email got forwarded to an address at Bonzi.com. I'm not sure if they're using list replies to harvest email addresses or not, but I'll definitely be watching my in-box. From: TechSupport [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Mon, 02 Jun 2003 17:17:55 GMT Subject: Re: [PHP] I guess I'll give the list a shot [T2003060200WW] This is an automatic reply to acknowledge that your message has been received. PLEASE DO NOT REPLY TO THIS MESSAGE. -- Dear [EMAIL PROTECTED], Thank you for submitting your question to our Technical Support Department. We received it on 6/2/2003 at 10:17:55 AM. Your tracking number for this message is: T2003060200WW. This message and tracking number are your assurance that we have received your message and will respond to it as quickly as possible. At BONZI Software we attempt to answer all of the questions we get on a first-come, first-served basis, as quickly as possible. On occasion we receive a large volume of e-mail that prevents us from answering your message as quickly as we would like. Please be assured that we have your message and will respond to it as quickly as we can. If your question to us is of a support nature, you can visit http://www.bonzi.com/support.htm to try and find an answer to your question in our online support center. This will often be quicker than we can reply to your message by hand, so we encourage you to try it out. Sincerely, Customer Support BONZI Software HTTP://www.bonzi.com -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function problem
changing the value in the php.ini file is not the ideal option, as it screws things up for all of users/scripts on the server. you could use ini_set() for the script to change the sendmail_path var for that script. you could use a mail class that does alot of the grunt work for you (Manuel Lemos normally posts some classes from his site, however I use PHPMailer (http://phpmailer.sourceforge.net) and have never looked back. On Fri, 2003-05-30 at 03:26, David Grant wrote: Bersani Francesco wrote: Hi, I have a problem with the mail function; it always sends mails assuming in the from field the user [EMAIL PROTECTED]. I tried to override it with this code: ? $email = [EMAIL PROTECTED]; $subject = prova invio mail ; $message = parappaaa ; $headers = From:[EMAIL PROTECTED]:[EMAIL PROTECTED]; mail($email, $subject, $message, $headers); ? -- It doesn't work... Can anybody help me ? Take a peek into php.ini to change the default value. Note that you should seperate mail headers with \r\n. Regards, David -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- Michael Geier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail - mime question
I've come a long way with many google searches an I almost have this working, so have mercy!!! So what am I missing here? I'm doing a Mail_mime class smtp mail from php using PEAR. It needs to have text and html versions which is why I'm using this. It is sending out the email OK, but when I get the mail, I get this as the body of the email: --=_026291a5f21535a06900e25d87a7070a Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Text email simple dimple --=_026291a5f21535a06900e25d87a7070a Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable htmlbodybHTMLb version of email/body/html --=_026291a5f21535a06900e25d87a7070a-- TIA... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail - mime question
Hello, On 05/30/2003 02:28 AM, Jim McNeely wrote: I've come a long way with many google searches an I almost have this working, so have mercy!!! So what am I missing here? I'm doing a Mail_mime class smtp mail from php using PEAR. It needs to have text and html versions which is why I'm using this. It is sending out the email OK, but when I get the mail, I get this as the body of the email: Maybe your problem has to due with mail() function bugs. You may want to try this other class that comes with work arounds to some of the mail() function bugs and you can easily compose messages with text and HTML in the same body as well embedded images and attached files if you need that too. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail function problem
Hi, I have a problem with the mail function; it always sends mails assuming in the from field the user [EMAIL PROTECTED]. I tried to override it with this code: ? $email = [EMAIL PROTECTED]; $subject = prova invio mail ; $message = parappaaa ; $headers = From:[EMAIL PROTECTED]:[EMAIL PROTECTED]; mail($email, $subject, $message, $headers); ? -- It doesn't work... Can anybody help me ? -- Francesco Bersani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function problem
Bersani Francesco wrote: Hi, I have a problem with the mail function; it always sends mails assuming in the from field the user [EMAIL PROTECTED]. I tried to override it with this code: ? $email = [EMAIL PROTECTED]; $subject = prova invio mail ; $message = parappaaa ; $headers = From:[EMAIL PROTECTED]:[EMAIL PROTECTED]; mail($email, $subject, $message, $headers); ? -- It doesn't work... Can anybody help me ? Take a peek into php.ini to change the default value. Note that you should seperate mail headers with \r\n. Regards, David -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail problem
I don't believe you can use the form of Someone [EMAIL PROTECTED]. I believe this is what the MTA receives as the MAIL TO (not to be confused with eth To: header), and it's not a legal format for that. --- Rosen [EMAIL PROTECTED] wrote: Hi, I'm using PHP 4.3.1 on Win98 and I have a problem with sending E-mail with CC: header. I use following code: *--- $to=[EMAIL PROTECTED]; $message=sometext...; $subject=somesubject; $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: Somebody [EMAIL PROTECTED]\r\n; $headers .= Cc: Support [EMAIL PROTECTED]\r\n; mail($to, $subject, $message, $headers); -- The problem is in the Cc: Support [EMAIL PROTECTED]\r\n. If I write it Cc: [EMAIL PROTECTED] - i.e. only E-mail adress without Support ..mailadress - it works. Can someone tell me where is the problem ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Header - id this PHP
I am trying to format the mail header that will be send by mail(). One thing that I noticed was it only accept for the first no. of lines or charracters (???) See sample 1 2. Is this a php problem (4.2.2) or has something to do the mailer ??? This script is working on (4.2.1) but is in different type of server. FYI, on header sent it has some other default header included Example. (1) $mail_headers .= MIME-Version: 1.0\r\n; $mail_headers .= From: WEB\n; $mail_headers .= Reply-to: $Email\n; $mail_headers .= Bcc: [EMAIL PROTECTED]; $mail_headers .= Content-Type: text/html; charset=ISO-8859-1\r\n; $mail_headers .= Content-Transfer-Encoding: quoted-printable\r\n; To: [EMAIL PROTECTED] Subject: Test From: [EMAIL PROTECTED], [EMAIL PROTECTED] Reply-to: [EMAIL PROTECTED] MIME-Version: 1.0 Rejected Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Example (2) $mail_headers .= Content-Type: text/html; charset=ISO-8859-1\r\n; $mail_headers .= Content-Transfer-Encoding: quoted-printable\r\n; $mail_headers .= MIME-Version: 1.0\r\n; $mail_headers .= From: WEB\n; $mail_headers .= Reply-to: $Email\n; $mail_headers .= Bcc: [EMAIL PROTECTED]; To: [EMAIL PROTECTED] Subject: Test Content-Type: text/html; charset=ISO-8859-1 Rejected: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 From: [EMAIL PROTECTED], [EMAIL PROTECTED] Reply-to: [EMAIL PROTECTED] Use \r\n between all of your headers (at the end of your strings, above). Just using \n will not work. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Bcc:
John, et al -- One more nit to add to this... ...and then CPT John W. Holmes said... % ... % % You can do it like this: % % $headers = From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: % [EMAIL PROTECTED]; Yes, figuring that the added line break is just because of a dumb mail program :-0 % % or % % $headers = From: [EMAIL PROTECTED] % CC: [EMAIL PROTECTED] % BCC: [EMAIL PROTECTED]; This can get you into trouble because it isn't portable. Mail headers are supposed to end in return (\r) *and* newline (\n) but all you're doing here is saying to insert the end-of-line sequence for this operating system. If you're on a windows box you're fine (though you have a myriad of other problems ;-) but if you're on a *NIX box you're only sending newline and if you're on a Mac you're only sending return (I don't know enough Mac to know if an OS X Mac has newlines like a classic Mac or like a *NIX box). Use the all-run-together format or a .= buildup and manually specify the needed \r\n to avoid the headache. HTH HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
[PHP] mail() function
The use of the standard mail(...) function is just not working and I would really appreciate some patient soul's time to access: http://www.up.net/~jolove/PHP/EMail/EmailPHP.phps and look at the code ... it really is very short ... The function send() returns success, yet my mail client, Eudora is not accepting emails when I send mail to myself. The HTML source which accesses the above .php code is: http://www.up.net/~jolove/email.phps Many, many thanks in advance ... John Love [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() Bcc:
How can send bcc: with mail()? -- Programmers are tools for convert coffeine into code... (c) Oden _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Bcc:
$mail-BCC( [EMAIL PROTECTED] ); - Original Message - From: Oden Odenius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:44 PM Subject: [PHP] mail() Bcc: How can send bcc: with mail()? -- Programmers are tools for convert coffeine into code... (c) Oden _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- 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() Bcc:
- Original Message - From: Oden Odenius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 1:44 PM Subject: [PHP] mail() Bcc: How can send bcc: with mail()? -- Programmers are tools for convert coffeine into code... (c) Oden From, CC and BCC are headers to be set in the fourth parameter of the mail() function. Headers must be spearated by end-of-line characters. $headers = From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]; mail($to, $subject, $body, $headers); There are many other headers that you may find useful that are just as easy to add through the mail() function. HTH, Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Bcc:
Not everyone has whatever class you seem to be using... Bryan Brannigan wrote: $mail-BCC( [EMAIL PROTECTED] ); - Original Message - From: Oden Odenius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:44 PM Subject: [PHP] mail() Bcc: How can send bcc: with mail()? -- Programmers are tools for convert coffeine into code... (c) Oden _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Bcc:
From: Oden Odenius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:44 PM Subject: [PHP] mail() Bcc: How can send bcc: with mail()? - Original Message - From: Bryan Brannigan [EMAIL PROTECTED] To: Oden Odenius [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:56 PM Subject: Re: [PHP] mail() Bcc: $mail-BCC( [EMAIL PROTECTED] ); Honestly, how do you expect that to help anyone? Do you assume the entire world is using whatever class you are using? They are not. At least tell them what class you're using as a recommendation, otherwise provide an answer that'll work with a regular PHP function. Thank you. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Bcc:
How can send bcc: with mail()? From, CC and BCC are headers to be set in the fourth parameter of the mail() function. Headers must be spearated by end-of-line characters. $headers = From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]; mail($to, $subject, $body, $headers); There are many other headers that you may find useful that are just as easy to add through the mail() function. I don't think that'll work. The concept is right, but the way you are typing it, you're actually adding in two line breaks between each header. That's going to cause your CC: and BCC: header to show up in the body of the message because anything after two consecutive line breaks is considered the body. You can do it like this: $headers = From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: [EMAIL PROTECTED]; or $headers = From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]; Also, you may want to check the regs on the capitalization of the headers. If I'm wrong, someone please let me know, but some servers may only accept Bcc: instead of bcc: or BCC:, etc... ?? Does anyone know if that matters? If it does, is it only dependant upon the sending SMTP server and not any servers the message is sent through or the receiving server? Thanks. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Bcc:
- Original Message - From: CPT John W. Holmes [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED]; Oden Odenius [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:51 PM Subject: Re: [PHP] mail() Bcc: How can send bcc: with mail()? From, CC and BCC are headers to be set in the fourth parameter of the mail() function. Headers must be spearated by end-of-line characters. $headers = From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]; mail($to, $subject, $body, $headers); There are many other headers that you may find useful that are just as easy to add through the mail() function. I don't think that'll work. The concept is right, but the way you are typing it, you're actually adding in two line breaks between each header. That's going to cause your CC: and BCC: header to show up in the body of the message because anything after two consecutive line breaks is considered the body. You can do it like this: $headers = From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: [EMAIL PROTECTED]; or $headers = From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]; Also, you may want to check the regs on the capitalization of the headers. If I'm wrong, someone please let me know, but some servers may only accept Bcc: instead of bcc: or BCC:, etc... ?? Does anyone know if that matters? If it does, is it only dependant upon the sending SMTP server and not any servers the message is sent through or the receiving server? Thanks. ---John Holmes... \r\n should be used (esspecially in email!) to be compatible with all operating systems. However there were mistakes in my example. Notedly the string I supplied would break the header with superfulous \n end-of-line characters. The safe syntax would be.. $headers = From: [EMAIL PROTECTED]; $headers .= CC: [EMAIL PROTECTED]; $headers .= BCC: [EMAIL PROTECTED]; In one continuous line. I do believe headers are case insensitive. HTH, Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Bcc:
- Original Message - From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 4:17 PM Subject: Re: [PHP] mail() Bcc: - Original Message - From: CPT John W. Holmes [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED]; Oden Odenius [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:51 PM Subject: Re: [PHP] mail() Bcc: How can send bcc: with mail()? From, CC and BCC are headers to be set in the fourth parameter of the mail() function. Headers must be spearated by end-of-line characters. $headers = From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]; mail($to, $subject, $body, $headers); There are many other headers that you may find useful that are just as easy to add through the mail() function. I don't think that'll work. The concept is right, but the way you are typing it, you're actually adding in two line breaks between each header. That's going to cause your CC: and BCC: header to show up in the body of the message because anything after two consecutive line breaks is considered the body. You can do it like this: $headers = From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: [EMAIL PROTECTED]; or $headers = From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]; Also, you may want to check the regs on the capitalization of the headers. If I'm wrong, someone please let me know, but some servers may only accept Bcc: instead of bcc: or BCC:, etc... ?? Does anyone know if that matters? If it does, is it only dependant upon the sending SMTP server and not any servers the message is sent through or the receiving server? Thanks. ---John Holmes... \r\n should be used (esspecially in email!) to be compatible with all operating systems. However there were mistakes in my example. Notedly the string I supplied would break the header with superfulous \n end-of-line characters. The safe syntax would be.. $headers = From: [EMAIL PROTECTED]; $headers .= CC: [EMAIL PROTECTED]; $headers .= BCC: [EMAIL PROTECTED]; In one continuous line. I do believe headers are case insensitive. HTH, Kevin Sorry John I wrote before I read. I misunderstood what you were correcting me about. I see now that you nailed my mistake. - Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Bcc:
At 23:51 24.03.2003, CPT John W. Holmes said: [snip] If I'm wrong, someone please let me know, but some servers may only accept Bcc: instead of bcc: or BCC:, etc... ?? Does anyone know if that matters? If it does, is it only dependant upon the sending SMTP server and not any servers the message is sent through or the receiving server? [snip] AFAIK the Bcc: address list is never found in the MIME headers at it is a list of _blind_ addresses - i.e. addresses that do _not_ show up in the messages, but whom the mail is delvered to as well. They do show up in the SMTP envelope, as RCPT TO: addresses during SMTP conversation. This is an example of how such a conversation could look like: S: 220 mail.mydomain.com; ESMTP Tue, Mar 25 2003, 00:49:12 C: HELO bluebear.mydomain.com S: 250 mail.mydomain.com Hello bluebear.mydomain.com Pleased to meet you C: MAIL FROM: [EMAIL PROTECTED] S: 250 2.1.0 [EMAIL PROTECTED] Sender ok C: RCPT TO: [EMAIL PROTECTED] S: 250 2.1.5 [EMAIL PROTECTED] Recipient ok C: RCPT TO: [EMAIL PROTECTED] S: 250 2.1.5 [EMAIL PROTECTED] Recipient ok C: DATA S: 354 Enter mail, end with . on a line by itself C: From: [EMAIL PROTECTED] C: To: [EMAIL PROTECTED] C: Subject: Test message C: C: Dear Saundra, this is only a test, please disregard. C: . S: 250 2.0.0 h2ONqQm26855 Message accepted for delivery C: QUIT S: 221 2.0.0 mail.mydomain.com closing connection You see the main recipient is listed in the MIME header (To:), but the Bcc recipient ([EMAIL PROTECTED]) is not; it only shows up during the SMTP conversation (the envelope part). AFAIK it's a feature of the mail client; be it an email program or a mailer class. -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail function
The use of the standard mail(...) function is just not working and I would really appreciate some patient soul's time to access: http://www.up.net/~jolove/PHP/EMail/EmailPHP.php and look at the code ... it really is very short ... The function send() returns success, yet my mail client, Eudora is not accepting emails when I send mail to myself. The HTML source which accesses the above .php code is: http://www.up.net/~jolove/email.php Many, many thanks in advance ... John Love [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function
Hello John, Please make a copy of the file with a .phps or .txt extension so the code is not parsed by PHP. Thanks, Jason John Love wrote: The use of the standard mail(...) function is just not working and I would really appreciate some patient soul's time to access: http://www.up.net/~jolove/PHP/EMail/EmailPHP.php and look at the code ... it really is very short ... The function send() returns success, yet my mail client, Eudora is not accepting emails when I send mail to myself. The HTML source which accesses the above .php code is: http://www.up.net/~jolove/email.php Many, many thanks in advance ... John Love [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() function.
Hi I have a problem whith the mail() function. I have used this function several times, but to day it don't work.. I use it like this: mail( $to, $subjekt, $body, $from ); and i got this warning: Warning: Failed to Connect in \\HQ-ADMIN\mail.php on line 237 Fred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail
Stephen wrote: I am trying to get mail working with my php setup. I have an exchange server that I want to send mail to but I get the error Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in I have setup SMTP = my server address and sendmail_from to my email address. It is the email server that is not allowing your computer (pittsh.com.au) to connect to send email. Ask the administrator of that computer to allow your computer to relay through it. FYI it is correct for email servers to only allow needed computers to connect to avoid being an open relay for spammers. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail attachment
I'm not sure why, but I get an attachment when sending out a mail with the following (see below). Well, I shouldn't say an attachment, but in Outlook I get that little paperclip, saying there is an attachment. But when I go to open the attachment, there is nothing there.I'm trying to send it to my Yahoo account, but it's not coming through there yet. mail([EMAIL PROTECTED], Website Notice, [messagebody], From: Liam [EMAIL PROTECTED]:[EMAIL PROTECTED]: text/ascii; charset=iso-8859-1\n); If need be, I can post the message body, but I'm hoping someone can figure it out without the extra few K in everyone's mailbox.
Re: [PHP] Mail attachment
At 23:24 18-3-2003, you wrote: I'm not sure why, but I get an attachment when sending out a mail with the following (see below). Well, I shouldn't say an attachment, but in Outlook I get that little paperclip, saying there is an attachment. But when I go to open the attachment, there is nothing there.I'm trying to send it to my Yahoo account, but it's not coming through there yet. mail([EMAIL PROTECTED], Website Notice, [messagebody], From: Liam [EMAIL PROTECTED]:[EMAIL PROTECTED]: text/ascii; charset=iso-8859-1\n); If need be, I can post the message body, but I'm hoping someone can figure it out without the extra few K in everyone's mailbox. It may be that the mail receiver expects some content after you put this in the header: Content-Type: text/ascii; charset=iso-8859-1\n If you're sending plain text, and no special (read: non-western) characters, i don't think you need that part. And I would change this: Liam [EMAIL PROTECTED] to: Liam [EMAIL PROTECTED] but that's not causing your problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail attachment
It may be that the mail receiver expects some content after you put this in the header: Content-Type: text/ascii; charset=iso-8859-1\n If you're sending plain text, and no special (read: non-western) characters, i don't think you need that part. That was the fix. Yer a goldmine. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail attachment
On Tue, 18 Mar 2003 23:19:08 +0100, Chris Hayes wrote about Re: [PHP] Mail attachment what the universal translator turned into this: It may be that the mail receiver expects some content after you put this in the header: Content-Type: text/ascii; charset=iso-8859-1\n If you're sending plain text, and no special (read: non-western) characters, i don't think you need that part. If you use any highbit characters (128) you need it, otherwise the recipient's client can't figure out what codetable they're in... Rene -- Rene Brehmer This message was written on 100% recycled spam. Come see! My brand new site is now online! http://www.metalbunny.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail(); works, but only for mails to my (mail)server
Manuel Glauser wrote: This weekend, I've been fighting with some really weird problem though... I installed a few mail(); actions on my website plus in some projects I'm working on. I have one really big problem though... Everything works fine until I want to send a mail to another mailserver than mine. So, it only works for my own (mail)server - how the hell is that possible? And: can I fix that? Do I have to include special headers? Any mailserver you use to send emails will need to be configured to allow you to connect. Otherwise any spammer can connect (open relay). Do you mean that you are trying to connect to a different mailserver or do you mean you are trying to send an email to a different domain. Usually you would only ever use one mailserver to send all emails to. I think we could use some more detail and its getting a bit OT for the list, but it sounds like a mailserver configuration issue. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail
Hi I am trying to get mail working with my php setup. I have an exchange server that I want to send mail to but I get the error Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in I have setup SMTP = my server address and sendmail_from to my email address. What else do I need to do? Thanks, Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail(); works, but only for mails to my (mail)server
Hey you guys! First, I have to say, that php.net gave me a lot of support in the last few weeks and months. It's been great to suck information from your guys' website! Thanx a lot! This weekend, I've been fighting with some really weird problem though... I installed a few mail(); actions on my website plus in some projects I'm working on. I have one really big problem though... Everything works fine until I want to send a mail to another mailserver than mine. So, it only works for my own (mail)server - how the hell is that possible? And: can I fix that? Do I have to include special headers? Thank you very much for yar answer! Greetz Manuel, Berne, Switzerland
[PHP] mail() function
Hello friends, Can the mail() function send emails to multiple addresses which are formatted as follows : [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a comma or a semicolon between them? Thanks Denis
[PHP] mail() in Linux
Hello, I want to use the mail() in my Linux computer.But I don't know how to set the php.ini file to enable it.I am using the SMTP server provided by ISP. Do I need to setup my own mail server? Thanks! Terry _ ¤µ¤é¬P®y http://www.msn.com.hk/fortune/west/ ¹Bµ{ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail function works, but always from nobody@localhost!
How exactly would I go about fixing my current php/sendmail setup so that it uses the value specified in my php input form in the from box instead of always setting the email from address as : [EMAIL PROTECTED] ??? Any help would be greatly appreciated. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail function and Bcc restriction?
Hi all, are there any restrictions for mail function, when I use Bcc? how many email adresses can i put in Bcc, are there any PHP restriction, or just memory restriction, or something else? Thanx a lot Mirza [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail() Failing to connect
Does anyone have any idea of why I may be getting this error, when my scripts ran perfectly fine before (i don't know what). Is there some kind of setting in my mail program that may have changed? I'm using Outlook with Exchange Server. Warning: Failed to Connect in d:\apache\htdocs/emailtest.php on line 43 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail (), BBC: recipients not receiving my Newsletter
I'll Try that instead :) Thnx! Rick Off Price Closeouts 1700 W 8 Ave Miami, FL 33010 (305) 888 2555 FAX (305) 884 1761 -Mensaje original- De: Jason k Larson [mailto:[EMAIL PROTECTED] Enviado el: Wednesday, February 26, 2003 5:59 PM Para: Ricardo Fitzgerald CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Mail (), BBC: recipients not receiving my Newsletter What about using a ';' semicolon seperated list. Ricardo Fitzgerald wrote: Hi to all, I wrote a small form which dumps data to a php script that uses mail () to send an html newsletter, so far is working except that it's not sending to BCC: headers, in my form I have a field to enter a comma delimited email list, after submiting the form this list is stored under one variable $emaillist, and in my php script I used $headers .= Bcc: .$emaillist.\r\n; then I call mail($to, $subject, $message, $headers); I don't receive an error message but my email list is not being sent, what I'm doing wrong ? Rick Fitzgerald Off Price Closeouts 1700 W 8 Ave Miami, FL 33010 (305) 888 2555 FAX (305) 884 1761 -- 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 (), BCC: recipients not receiving my Newsletter
It's not working either ... Rick Off Price Closeouts 1700 W 8 Ave Miami, FL 33010 (305) 888 2555 FAX (305) 884 1761 -Mensaje original- De: Jason k Larson [mailto:[EMAIL PROTECTED] Enviado el: Wednesday, February 26, 2003 5:59 PM Para: Ricardo Fitzgerald CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Mail (), BBC: recipients not receiving my Newsletter What about using a ';' semicolon seperated list. Ricardo Fitzgerald wrote: Hi to all, I wrote a small form which dumps data to a php script that uses mail () to send an html newsletter, so far is working except that it's not sending to BCC: headers, in my form I have a field to enter a comma delimited email list, after submiting the form this list is stored under one variable $emaillist, and in my php script I used $headers .= Bcc: .$emaillist.\r\n; then I call mail($to, $subject, $message, $headers); I don't receive an error message but my email list is not being sent, what I'm doing wrong ? Rick Fitzgerald Off Price Closeouts 1700 W 8 Ave Miami, FL 33010 (305) 888 2555 FAX (305) 884 1761 -- 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
[PHP] Mail (), BBC: recipients not receiving my Newsletter
Hi to all, I wrote a small form which dumps data to a php script that uses mail () to send an html newsletter, so far is working except that it's not sending to BCC: headers, in my form I have a field to enter a comma delimited email list, after submiting the form this list is stored under one variable $emaillist, and in my php script I used $headers .= Bcc: .$emaillist.\r\n; then I call mail($to, $subject, $message, $headers); I don't receive an error message but my email list is not being sent, what I'm doing wrong ? Rick Fitzgerald Off Price Closeouts 1700 W 8 Ave Miami, FL 33010 (305) 888 2555 FAX (305) 884 1761 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail (), BBC: recipients not receiving my Newsletter
Yeah I am having the same problem also.. it used to work and Im not sure when it happened.. it just doesn¹t work anymore.. Someone enlighten us? Rick When one door closes, another opens; but we often look so long and so regretfully upon the closed door that we do not see the one which has opened for us. - Alexander Graham Bell From: Ricardo Fitzgerald [EMAIL PROTECTED] Date: Wed, 26 Feb 2003 17:40:25 -0500 To: [EMAIL PROTECTED] Subject: [PHP] Mail (), BBC: recipients not receiving my Newsletter Hi to all, I wrote a small form which dumps data to a php script that uses mail () to send an html newsletter, so far is working except that it's not sending to BCC: headers, in my form I have a field to enter a comma delimited email list, after submiting the form this list is stored under one variable $emaillist, and in my php script I used $headers .= Bcc: .$emaillist.\r\n; then I call mail($to, $subject, $message, $headers); I don't receive an error message but my email list is not being sent, what I'm doing wrong ? Rick Fitzgerald Off Price Closeouts 1700 W 8 Ave Miami, FL 33010 (305) 888 2555 FAX (305) 884 1761 -- 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 (), BBC: recipients not receiving my Newsletter
What about using a ';' semicolon seperated list. Ricardo Fitzgerald wrote: Hi to all, I wrote a small form which dumps data to a php script that uses mail () to send an html newsletter, so far is working except that it's not sending to BCC: headers, in my form I have a field to enter a comma delimited email list, after submiting the form this list is stored under one variable $emaillist, and in my php script I used $headers .= Bcc: .$emaillist.\r\n; then I call mail($to, $subject, $message, $headers); I don't receive an error message but my email list is not being sent, what I'm doing wrong ? Rick Fitzgerald Off Price Closeouts 1700 W 8 Ave Miami, FL 33010 (305) 888 2555 FAX (305) 884 1761 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Sending Error
Im having some more error checking issues :) This time its with sending email using php. Im absolutely sure that the email address is correct and that my IMAP module is enabled for php as I successfully read emails from my ISP. But when I sent an email with: mail($to, $subject, $body, $headers) it failed and I wanted to know how I can get a more descriptive error from the failure of this function... any ideas? Thanks again, I really appreciate the help. -ML -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail function fails with no error code
I am unable to send emails, and there are no errors being generated or populated in the $php_errormsg variable, since I enabled track errors in the php.ini. So I have no idea why the mail send is failing. Am I supposed to specify a mail server to use for sending mail? My sendmail was setup automatically in my Redhat Setup and I have not touched its configuration options...is there something I need to change? The sendmail path that is shown in the phpinfo() function display is correct. Any feedback would be greatly appreciated. Thanks! -M L -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() using Return-Path: and Error-To:....
Hiya fellas I'm doing the test on sending emails and what I found is that I haven't got these two to to work which is Return-Path: and Error-To: Does anyone know why does it not work??? Here's my sample codes --clip-- $Header = From: [EMAIL PROTECTED]\r\n; $Header .= Return-Path: [EMAIL PROTECTED]\r\n; $Header .= Error-To: [EMAIL PROTECTED]\r\n; $Header .= MIME-Version: 1.0\r\n; $Header .= Content-type: text/plain; charset=iso-8859-1\r\n; $Header .= X-Priority: 3\r\n; $Header .= X-MSMail-Priority: Normal\r\n; $Header .= X-Mailer: PHP .phpversion().\r\n; mail([EMAIL PROTECTED],test,This is a test,$Header); --clip-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail function - using remote smtp in php.ini
IS there a way to tell php to use a remote smtp daemon for its mta under UNIX. I see in the example it looks like windows can be configured to use a remote smtp. If so what is the syntax. [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 = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function - using remote smtp in php.ini
On Tuesday 18 February 2003 01:44, Robin Mordasiewicz wrote: IS there a way to tell php to use a remote smtp daemon for its mta under UNIX. I see in the example it looks like windows can be configured to use a remote smtp. If so what is the syntax. [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 = Checkout www.phpclasses.org for a/some mailing class(es) that allows this. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Machines take me by surprise with great frequency. - Alan Turing */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP mail function From header not working
When I try to use a php script, to send an email, the From header is replaced by a senders email address of my provider. Is there any way to make it so my email address shows up in the From header? In the script I used fake addresses, because of client privacy reasons... ? $email = [EMAIL PROTECTED]; $mailheaders = From: My Name\n; $mailheaders .= Reply-To: [EMAIL PROTECTED]\n\n; $message2 =MESSAGE GOES HERE; mail($email,TITLE,$message2,$mailheaders); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail question
is it possible to do something like mail([EMAIL PROTECTED],subject,hello if($a){ return andreas; }); or what would be the best solution for this ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail question
On Friday 14 February 2003 18:53, Jonas Geiregat wrote: is it possible to do something like mail([EMAIL PROTECTED],subject,hello if($a){ return andreas; }); or what would be the best solution for this ? Try it. I would prefer: if ($a) { $name = 'andreas'; } else { $name = ''; } mail([EMAIL PROTECTED],subject,hello $name); -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Seize the day, put no trust in the morrow! -- Quintus Horatius Flaccus (Horace) */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP mail function From header not working
Marco Alting [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... When I try to use a php script, to send an email, the From header is replaced by a senders email address of my provider. Is there any way to make it so my email address shows up in the From header? In the script I used fake addresses, because of client privacy reasons... ? $email = [EMAIL PROTECTED]; $mailheaders = From: My Name\n; $mailheaders .= Reply-To: [EMAIL PROTECTED]\n\n; $message2 =MESSAGE GOES HERE; mail($email,TITLE,$message2,$mailheaders); ? Are you running this on Windows? If you are have a look at: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP mail function From header not working
Marco Alting [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... When I try to use a php script, to send an email, the From header is replaced by a senders email address of my provider. Is there any way to make it so my email address shows up in the From header? In the script I used fake addresses, because of client privacy reasons... ? $email = [EMAIL PROTECTED]; $mailheaders = From: My Name\n; $mailheaders .= Reply-To: [EMAIL PROTECTED]\n\n; $message2 =MESSAGE GOES HERE; mail($email,TITLE,$message2,$mailheaders); ? Are you running this on windows? If you are have a look at: http://www.php.net/manual/en/ref.mail.php The sendmail_from setting may be what you are looking for. You will need to set it using ini_set. Regards Lee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail question
Try: mail('[EMAIL PROTECTED]','subject','hello '.($a ? 'andreas')); Jonas Geiregat wrote: is it possible to do something like mail([EMAIL PROTECTED],subject,hello if($a){ return andreas; }); or what would be the best solution for this ? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() and php.ini (Any Luck???)
Hi Everyone The webserver is a Unix machine. I don't want to send the email from the Unix machine, I want to do that from Window. So, if I configure hte php.ini to find the MS-Exchange on Window and use it to send the email while the webpage is on the Unix webserver, such as form fill out and click the send button. Have anyone try this and does it work? Anyone struggle with it?? I'm going to go ahead and do it. Thanks, Scott F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() and php.ini (Any Luck???)
On Wednesday 12 February 2003 02:12, Scott Fletcher wrote: The webserver is a Unix machine. I don't want to send the email from the Unix machine, I want to do that from Window. So, if I configure hte php.ini to find the MS-Exchange on Window and use it to send the email while the webpage is on the Unix webserver, such as form fill out and click the send button. Have anyone try this and does it work? Anyone struggle with it?? I'm going to go ahead and do it. It wouldn't work. On Unix, mail() uses the sendmail binary and ignores any SMTP setting. You can get yourself a mail class from www.phpclasses.org which can use SMTP regardless of whether you're on Unix or Windows. Anyway, what is the reason for using an external mailserver? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Mausoleum: The final and funniest folly of the rich. -- Ambrose Bierce */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() and php.ini (Any Luck???)
Someone send me an email to take a look at this URLhttp://www.php.net/manual/fi/ref.imap.php . The send mail on Unix is too basic, not like MS-Exchange... I need things like file attachment, Bcc, cc, etc Also, it is too slow because the machine have problem with DNS while many Windows doesn't have this problem. Thanks for the link to www.phpclasses.org . Will look into it. Scott F. Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wednesday 12 February 2003 02:12, Scott Fletcher wrote: The webserver is a Unix machine. I don't want to send the email from the Unix machine, I want to do that from Window. So, if I configure hte php.ini to find the MS-Exchange on Window and use it to send the email while the webpage is on the Unix webserver, such as form fill out and click the send button. Have anyone try this and does it work? Anyone struggle with it?? I'm going to go ahead and do it. It wouldn't work. On Unix, mail() uses the sendmail binary and ignores any SMTP setting. You can get yourself a mail class from www.phpclasses.org which can use SMTP regardless of whether you're on Unix or Windows. Anyway, what is the reason for using an external mailserver? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Mausoleum: The final and funniest folly of the rich. -- Ambrose Bierce */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() and php.ini (Any Luck???)
On Tuesday 11 February 2003 02:19 pm, Scott Fletcher wrote: Someone send me an email to take a look at this URLhttp://www.php.net/manual/fi/ref.imap.php . The send mail on Unix is too basic, not like MS-Exchange... I need things like file attachment, Bcc, cc, etc All of those can be done with sendmail. Bcc and cc can be done with just adding extra header. In the php mail() function, it's the last argument IIRC. There are a lot of classes out there that will allow you to put attachment using the mail() function. Basically you only need the correct MIME-encoding and stuff. Read the manual for mail() again in php.net, or google for php mail attachment. You have to do it the same way to even in Windoze machine. It's not because of sendmail on Unix is too basic. If you still want to use Windoze smtp server for sending your mail, then I think you need to open a socket connection to the machine running smtp. In my opinion, this complicates stuff that can be done easier, but you can look here: http://www.php.net/manual/en/function.fsockopen.php. There is even an example by some user contributed notes on how to do that. Also, it is too slow because the machine have problem with DNS while many Windows doesn't have this problem. hmm.. that sounds like something misconfigured in the machine, maybe?? Hope that helps. --RDB Thanks for the link to www.phpclasses.org . Will look into it. Scott F. Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wednesday 12 February 2003 02:12, Scott Fletcher wrote: The webserver is a Unix machine. I don't want to send the email from the Unix machine, I want to do that from Window. So, if I configure hte php.ini to find the MS-Exchange on Window and use it to send the email while the webpage is on the Unix webserver, such as form fill out and click the send button. Have anyone try this and does it work? Anyone struggle with it?? I'm going to go ahead and do it. It wouldn't work. On Unix, mail() uses the sendmail binary and ignores any SMTP setting. You can get yourself a mail class from www.phpclasses.org which can use SMTP regardless of whether you're on Unix or Windows. Anyway, what is the reason for using an external mailserver? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Mausoleum: The final and funniest folly of the rich. -- Ambrose Bierce */ -- - /\ ASCII Ribbon Campaign against HTML \ / email and proprietary format X attachments. / \ - Have you been used by Microsoft today? Choose your life. Choose freedom. Choose LINUX. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() and php.ini (Any Luck???)
On Wednesday 12 February 2003 03:19, Scott Fletcher wrote: The send mail on Unix is too basic, not like MS-Exchange... I need things like file attachment, Bcc, cc, etc I think you're missing the point somewhere. sendmail (in fact any MTA) will do all that. Also, it is too slow because the machine have problem with DNS while many Windows doesn't have this problem. That machine is probably misconfigured. If you're looking for performance then, all things being equal (same machine, same network connectivity), you're more likely to get that with a un*x system than a Windows system. In any case pumping mail through another machine (ie using SMTP) is always slower than calling sendmail directly. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Abandon the search for Truth; settle for a good fantasy. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() and php.ini (Any Luck???)
No, nothing is misconfigured on this machine. The problem is the firewall and the nameserver. So, the easy workaround to it is to use the MS-Exchange on Window. Sendmail on Unix still doesn't allow me to use more stuffs, so I had to use MS-Exchange. Sendmail is not the right kind of email service to use, so I can't use it. By the way, Found a nice open-source script at www.phpclasses.org that would allow me to connect to MS-Exchange. Very nice, I'm going to use this. Thanks!!! Thanks, Scott F. Reuben D. Budiardja [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tuesday 11 February 2003 02:19 pm, Scott Fletcher wrote: Someone send me an email to take a look at this URLhttp://www.php.net/manual/fi/ref.imap.php . The send mail on Unix is too basic, not like MS-Exchange... I need things like file attachment, Bcc, cc, etc All of those can be done with sendmail. Bcc and cc can be done with just adding extra header. In the php mail() function, it's the last argument IIRC. There are a lot of classes out there that will allow you to put attachment using the mail() function. Basically you only need the correct MIME-encoding and stuff. Read the manual for mail() again in php.net, or google for php mail attachment. You have to do it the same way to even in Windoze machine. It's not because of sendmail on Unix is too basic. If you still want to use Windoze smtp server for sending your mail, then I think you need to open a socket connection to the machine running smtp. In my opinion, this complicates stuff that can be done easier, but you can look here: http://www.php.net/manual/en/function.fsockopen.php. There is even an example by some user contributed notes on how to do that. Also, it is too slow because the machine have problem with DNS while many Windows doesn't have this problem. hmm.. that sounds like something misconfigured in the machine, maybe?? Hope that helps. --RDB Thanks for the link to www.phpclasses.org . Will look into it. Scott F. Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wednesday 12 February 2003 02:12, Scott Fletcher wrote: The webserver is a Unix machine. I don't want to send the email from the Unix machine, I want to do that from Window. So, if I configure hte php.ini to find the MS-Exchange on Window and use it to send the email while the webpage is on the Unix webserver, such as form fill out and click the send button. Have anyone try this and does it work? Anyone struggle with it?? I'm going to go ahead and do it. It wouldn't work. On Unix, mail() uses the sendmail binary and ignores any SMTP setting. You can get yourself a mail class from www.phpclasses.org which can use SMTP regardless of whether you're on Unix or Windows. Anyway, what is the reason for using an external mailserver? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Mausoleum: The final and funniest folly of the rich. -- Ambrose Bierce */ -- - /\ ASCII Ribbon Campaign against HTML \ / email and proprietary format X attachments. / \ - Have you been used by Microsoft today? Choose your life. Choose freedom. Choose LINUX. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php