[PHP] Re: Sendmail question
Hello, on 03/14/2008 12:35 PM nihilism machine said the following: So the email should be a link to: http://www.mysite.com/permalink.php?ID=120 but instead links to: http://www.mysite.com/permalink.php?ID%120 The problem is that you have specified quoted-printable encoding and have not properly encoded all characters in the HTML. I recommend that you a class that knows how to properly message bodies with quoted-printable. I use the MIME message class. Take a look at the test_simple_html_mail.php example script. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos PHP professionals looking for PHP jobs http://www.phpclasses.org/professionals/ PHP Classes - 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] Re: Sendmail Return-Path
Hello, On 07/27/2004 06:07 PM, Enda Nagle - Lists wrote: I¹m using PHP¹s mail() function on several sites, but have difficulty sometimes with the mails being tagged as SPAM. I want to have the Return-Path set to the site admin, but can¹t see where to do this. I know that it can be done at server root level but I can¹t really do that as its a shared server. I do have my own php.ini file for my site, but can only see the following vars: 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 = /usr/sbin/sendmail -t -i I¹m working off a Linux box, so presumably I can¹t use the sendmail_from variable? I also tried to set the following variable in the headers for the mail: $headers .= X-Return-path: ME [EMAIL PROTECTED]\r\n; Setting the return path is dependent of the delivery method. You may be able to set it using the mail function fifth argument, send via SMTP or call the sendmail program directly. You may want to try this class that simplifies everything by emulating the Return-Path header. Then, depending on the delivery method that is used, it will map to the appropriate action to set the return path address. You have the option to choose delivery via the mail() function, sendmail program, qmail program . Pick one delivery option that works well for you given your environment restrictions. http://www.phpclasses.org/mimemessage Feel free to mail me privately if you need further help, so you do not have to disclose in public private details of your environment. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sendmail wrapper
On 02/02/2004 06:18 PM, Federico Petronio wrote: Hi all... I have a chrooted Apache/PHP on Solaris 8 working fine except for one PHP function, mail(). I read that in Unix environments there is not possible to make PHP use a remote SMTP and it needs to find a sendmail executable un the path. Since including Postfix in the chrooted env. does not look very nice, I try to use a wapper (local_FS-remote_SMTP), but I am not happy with the one I found. It does not handle well the CC, nor the BCC so I change it a little, but still have issues (for explample if the SMTP does not responds, it don't try angain and the mail is lost). Do you know some sendmail wrapper to recomend? You may want to try this class for composing and sending e-mail messages. It comes with sub-classes specialized in deliverying messages with sendmail or compatible, qmail and SMTP. If you do not want to use the class directly, it comes with wrapper functions that emulate the mail() function. http://www.phpclasses.org/mimemessage For SMTP delivery, you also need this: http://www.phpclasses.org/smtpclass -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ MetaL - XML based meta-programming language http://www.meta-language.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sendmail vs smpt
Hello, On 12/02/2003 07:50 PM, Pablo Gosse wrote: Hi all. I'm curious as to the performance difference between scripts that use sendmail vs. smtp for their mailing abilities. I use the following class for delivering emails, http://phpmailer.sourceforge.net http://phpmailer.sourceforge.net/ , and since I don't have sendmail running on my local machine I'm using the smtp server of the university where I work to deliver my messages. However, it seems to be a bit sluggish. I'm going to run a test of switching the mail handler from smtp to sendmail once the application is in its permanent home in a few weeks, but for now does anyone have any opinions on this, and is there any advantage to using one over the other? Forget SMTP. There is a myth that SMTP is faster than queuing message via sendmail but that is just a reflex that some people do not understand how it works. What you need to understand is that sending messages usually consists on two things: queueing and deliverying. Usually you do not deliver messages directly to the end recipient. You just pass them to a MTA (Mail Transfer Agent) that will take care of the delivery. When you you pass the message to sendmail program, depending on it may be configured, it may either try to deliver the message immediately and return when it is done, or just leave the message on the local queue for later delivery. When you relay the message to a SMTP server, usually it just queues the message there for later delivery. Obviously, if you use sendmail and it tries to deliver the message immediately, it will take eventually a little more time, but the message is already delivered. If the message is queued for later delivery, your PHP script does not have to wait so much but the message may take much longer to be deliver. Even if you just want to queue the messages for later delivery to free your PHP scripts, sendmail can do it much faster because you will be using local interprogram communication to injec the message in the local queue. If you do it via SMTP server, you need to establish a TCP connection which is much slower even when the SMTP server is in the same machine. If you just want to free your PHP scripts and leave messages in the queue, what you may need to do is to pass sendmail the appropriate switches to tell it to do it so. For that, you can check sendmail documentation to see the available modes, or you may want to try this e-mail message composing and sending class that has sub-classes specialized in delivering via mail() function, sendmail, qmail and SMTP. The sendmail subclass provides options that translate to the appropriate sendmail switches. For faster queueing, set the delivery_mode variable of the sendmail_message_class to SENDMAIL_DELIVERY_DEFERRED . If you can have a qmail MTA in your machine, use qmail because it is by far the most efficient. 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] Re: sendmail problem!
Hello, On 11/27/2002 09:01 PM, Siamak wrote: I use PEAR to send mails to my users through sendmail, my mails sometimes are delivered immediately, sometimes after some minutes and sometimes after some hours and sometimes never! I tried to identify the cause but I wasn't successful, is there someone out there who can help me? I want to send an immediate message to my newly signed up users. You need to use some switches to enable immediate deliver. You may want to try this class with the sendmail_message subclass that calls sendmail directly using the necessary switches to enable the immediate delivery mode. http://www.phpclasses.org/mimemessage I use that class with this other class for the same purpose as you to use the direct delivery mode using SMTP directly, thus without relying on SMTP: http://www.phpclasses.org/smtpclass -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sendmail problem
anybody??? still haven't gotten this figure out. Jeff Jeff Bluemel [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... OK - I got the rasmail codes from Zend.com's code library. it is working perfectly for my application except for one problem. the email I am using to send has a .pdf file attachment. I can open that PDF file up directly from the site after it is created, but I cannot open the file attachment up. it seems the coding is wrong of something like that so that the attachment is getting corrupted. I have emailed the author for assistance, but haven't receive a response. I'm hoping somebody here can assist me. here is the part of code; function Attachment($attachedfile) { if ($attachedfile) { $pf=@fopen($attachedfile,r) or die($this-ErrorOutput(9)); $bytes=fread($pf,filesize($attachedfile)); $file=chunk_split(base64_encode($bytes)); fclose($pf); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sendmail problem
Hello, On 11/16/2002 04:53 PM, Jeff Bluemel wrote: anybody??? still haven't gotten this figure out. You may want to try this class and mail me back if it does not work: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Jeff Jeff Bluemel [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... OK - I got the rasmail codes from Zend.com's code library. it is working perfectly for my application except for one problem. the email I am using to send has a .pdf file attachment. I can open that PDF file up directly from the site after it is created, but I cannot open the file attachment up. it seems the coding is wrong of something like that so that the attachment is getting corrupted. I have emailed the author for assistance, but haven't receive a response. I'm hoping somebody here can assist me. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sendmail problem
Thanks for the reply... it took me a little bit to get this worked out, but it is working perfectly now. I appreciate the assistance. Jeff Manuel Lemos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, On 11/16/2002 04:53 PM, Jeff Bluemel wrote: anybody??? still haven't gotten this figure out. You may want to try this class and mail me back if it does not work: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Jeff Jeff Bluemel [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... OK - I got the rasmail codes from Zend.com's code library. it is working perfectly for my application except for one problem. the email I am using to send has a .pdf file attachment. I can open that PDF file up directly from the site after it is created, but I cannot open the file attachment up. it seems the coding is wrong of something like that so that the attachment is getting corrupted. I have emailed the author for assistance, but haven't receive a response. I'm hoping somebody here can assist me. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sendmail return-path from my virtual webhost
I was hoping there was a way to fix it without having to modify my php scripts [e.g., phpBB2, postlister, etc.] Manuel Lemos wrote: Hello, On 07/29/2002 01:54 PM, Al wrote: Emails sent from my php scripts, using sendmail, all have a goofy return-path variable in the header. Is there a way I can correct this, or does it require a change to the sendmail config file that I can't get to? Yes, you can use mail() 5th argument or call sendmail directly with the popen using -f switch. Take a look at these classes to learn how to do it in case you have doubts: http://www.phpclasses.org/mimemessage -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sendmail return-path from my virtual webhost
Hello, On 07/30/2002 01:30 PM, Al wrote: I was hoping there was a way to fix it without having to modify my php scripts [e.g., phpBB2, postlister, etc.] There is an explicit php.ini option for that but it only works under Windows. On Unix, you may also try defining the sendmail path added [EMAIL PROTECTED] . Regards, Manuel Lemos Manuel Lemos wrote: Hello, On 07/29/2002 01:54 PM, Al wrote: Emails sent from my php scripts, using sendmail, all have a goofy return-path variable in the header. Is there a way I can correct this, or does it require a change to the sendmail config file that I can't get to? Yes, you can use mail() 5th argument or call sendmail directly with the popen using -f switch. Take a look at these classes to learn how to do it in case you have doubts: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sendmail return-path from my virtual webhost
Emails sent from my php scripts, using sendmail, all have a goofy return-path variable in the header. Is there a way I can correct this, or does it require a change to the sendmail config file that I can't get to? You should be able to use the fifth parameter (additional parameters) that was added in PHP 4.0.5 to properly set the envelope-sender, which will cause the 'Return-Path' header to be set properly. Quick example: ? $to = 'You [EMAIL PROTECTED]'; $from = '[EMAIL PROTECTED]'; $subject = 'hey!'; $message = 'This is the message.'; mail($to, $subject, $message, From: $from, -f$from); ? Note that this doesn't do error checking on the status of the mail() command -- it's just a quick example. There also may be sendmail config things that prevent you from setting the Return-Path in this manner; that's out of my area of expertise, so if the above doesn't work, I'm not much more help... Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sendmail return-path from my virtual webhost
Hello, On 07/29/2002 01:54 PM, Al wrote: Emails sent from my php scripts, using sendmail, all have a goofy return-path variable in the header. Is there a way I can correct this, or does it require a change to the sendmail config file that I can't get to? Yes, you can use mail() 5th argument or call sendmail directly with the popen using -f switch. Take a look at these classes to learn how to do it in case you have doubts: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sendmail
Do you have a specific reason for calling Sendmail directly? If not, try http://www.php.net/manual/en/function.mail.php Erica Uma Shankari T. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Can anyone help me in solving this problem.. For sending mail using sendmail i have written the code like this but it is giving some error messages in the From address instead of address $TO=Me; $[EMAIL PROTECTED]; $fd = popen(/usr/sbin/sendmail -t,w); fputs($fd, To: $user\n); fputs($fd, From: $TO\n); fputs($fd, Subect: Feedback\n); $ver = phpversion(); fputs($fd, X-Mailer: PHP/FI $ver\n\n); fputs($fd, Hii $user,\n $body \n); pclose($fd); Can anyone tell the solution for this. -Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sendmail entry in PHP.ini
Jason Michael wrote: Does anyone know what the correct entry for the php.ini that allows you to to use sendmail in OSX 10.0.4 Server? Sendmail support is disabled when OS is Windows, it should be able to use sendmail support with Mac OSX. (It it work :) -- Yasuo Ohgaki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: sendmail
Thank you for advise, I think I'll use .htaccess and that would be fine. But why do I need to include ? I'm using in on my local Apache win32 without even though I understand what is string Youri On 19 Aug 2001, at 16:01, Richard Lynch wrote: I'm on virtual hosting that lets me configure anything with .htaccess file. I was recomended by provider to specify location of sendmail in case I want to use php mail() function I know that I may do it in htaccess file by adding php_value sendmail_path /usr/sbin/sendmail The qwestion is can I do anything else but correcting the path in .htaccess, this is the last thing I want to do. First of all, you'll need: php_value sendmail_path /usr/sbin/sendmail -t Yes, you need the quotes. And possibly some other options inside quotes depending on your ISP's configuration of sendmail. I don't understand your ISP's rationale for requiring you to do this in .htaccess instead of just doing it himself... Either he's letting you use mail() or he's not. I also don't understand why you are loathe to do this... Unless you've heard .htaccess is slow (which it is). Alas, since your ISP has already turned on .htaccess support, you're *NOT* causing any additional significant slow-down to *utilize* the feature. The slowness is in Apache looking for the damn file, not in your putting (reasonable) stuff in it. Oh yeah, to answer your original question :-) You probably *COULD* set up an SMTP server on some other machine and just fsockopen() to that SMTP server and spew your emails to that. This will be way more faster anyway. Or, perhaps your ISP has an SMTP server that PHP can fsockopen() and spew to. Depends on how he configured it. There's all sorts of sample code for this SMTP spewing, so you needn't write it from scratch -- though it ain't rocket science. I did it, so it *CANNOT* be that difficult. :-) -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: sendmail
I'm on virtual hosting that lets me configure anything with .htaccess file. I was recomended by provider to specify location of sendmail in case I want to use php mail() function I know that I may do it in htaccess file by adding php_value sendmail_path /usr/sbin/sendmail The qwestion is can I do anything else but correcting the path in .htaccess, this is the last thing I want to do. First of all, you'll need: php_value sendmail_path /usr/sbin/sendmail -t Yes, you need the quotes. And possibly some other options inside quotes depending on your ISP's configuration of sendmail. I don't understand your ISP's rationale for requiring you to do this in .htaccess instead of just doing it himself... Either he's letting you use mail() or he's not. I also don't understand why you are loathe to do this... Unless you've heard .htaccess is slow (which it is). Alas, since your ISP has already turned on .htaccess support, you're *NOT* causing any additional significant slow-down to *utilize* the feature. The slowness is in Apache looking for the damn file, not in your putting (reasonable) stuff in it. Oh yeah, to answer your original question :-) You probably *COULD* set up an SMTP server on some other machine and just fsockopen() to that SMTP server and spew your emails to that. This will be way more faster anyway. Or, perhaps your ISP has an SMTP server that PHP can fsockopen() and spew to. Depends on how he configured it. There's all sorts of sample code for this SMTP spewing, so you needn't write it from scratch -- though it ain't rocket science. I did it, so it *CANNOT* be that difficult. :-) -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]