|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello.
Can i use the mail server of my isp to send a mail from a php script, as if it was sent from the email i have with that isp ? Thanks. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Correia wrote:
> Hello. > Can i use the mail server of my isp to send a mail from a php script, > as if it was sent from the email i have with that isp ? > > Thanks. Yes, by and large. I am not clear as to whether the server running PHP is with your ISP, on in a box at home so to speak though. Nor is the phrase 'as if it was sent from the email I have with that ISP' unambiguous. On short, rewrite the question in a slightly less lazy way, and you may get a more precise answer. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Feb 15, 9:53pm, The Natural Philosopher <a...@b.c> wrote:
> Correia wrote: > > Hello. > > Can i use the mail server of my isp to send a mail from a php script, > > as if it was sent from the email i have with that isp ? > > > Thanks. > > Yes, > > by and large. > > I am not clear as to whether the server running PHP is with your ISP, on > in a box at home so to speak though. > > Nor is the phrase 'as if it was sent from the email I have with that > ISP' unambiguous. > > On short, rewrite the question in a slightly less lazy way, and you may > get a more precise answer. I'll try... My server is at home, and i can send mails from it. But because they are sent from my computer they fail to pass the major spam filters. My question is: Suppose i have an email of a major isp (more chances to pass a spam filter): Email: mymail@isp.com Smtp: smtp.isp.com password: mypass Can i use THAT account to send emails from a php script, so they can pass more spam filters? ...and by the way, sorry for my bad english. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Correia wrote:
> On Feb 15, 9:53 pm, The Natural Philosopher <a...@b.c> wrote: >> Correia wrote: >>> Hello. >>> Can i use the mail server of my isp to send a mail from a php script, >>> as if it was sent from the email i have with that isp ? >>> Thanks. >> Yes, >> >> by and large. >> >> I am not clear as to whether the server running PHP is with your ISP, on >> in a box at home so to speak though. >> >> Nor is the phrase 'as if it was sent from the email I have with that >> ISP' unambiguous. >> >> On short, rewrite the question in a slightly less lazy way, and you may >> get a more precise answer. > > > > > > > I'll try... > > My server is at home, and i can send mails from it. But because they > are sent from my computer they fail to pass the major spam filters. Ah. So you need an SMTP relay set up.. > My question is: > > Suppose i have an email of a major isp (more chances to pass a spam > filter): > > Email: mymail@isp.com > Smtp: smtp.isp.com > password: mypass > > Can i use THAT account to send emails from a php script, so they can > pass more spam filters? > Yes, and no. A lot depends. There seem to be three ways that you can end mail from a 'private' machine, all involving an SMTP relay. None are ubiquitous. 1/. You may be able to send as anybody via your transit ISP'S relay, which will be configured to accept mail ONLY from machines within their customer network. If this is what your ISP allows, its the easiest way of all. Mine does. I can send mail via postfix pretending to be any one of a dozen email senders, not all of whom are on the ISP's list of domains. Essentially they are 'trusting' my sender IP address. 2/. You may have to send via the relay that is registered for use by the domain itself. I ran into this one last week. I had to send as webmaster@thisdomain.com, via smtp.thisdomain.com from a completely different site. The first few bounced: they SAID that only after I had used that account via POP3 would the machine address and sender address be 'registered' and then allowed to send mail. So I manually connected to the pop server and logged in as 'webmaster' and then quit the session. It worked. 3/. If they are extremely paranoid, you may need to use a name/password with the relay. I could not see how to make postfix actually do this, but I assume its possible. I would be intersted in this myself if anyone knows the answer. > > ...and by the way, sorry for my bad english. > ,,and my execrable typi9ng ;-) > > > > > > > > > > |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Hello,
on 02/15/2008 08:07 PM Correia said the following: > My server is at home, and i can send mails from it. But because they > are sent from my computer they fail to pass the major spam filters. > My question is: > > Suppose i have an email of a major isp (more chances to pass a spam > filter): > > Email: mymail@isp.com > Smtp: smtp.isp.com > password: mypass > > Can i use THAT account to send emails from a php script, so they can > pass more spam filters? You can but there are some details. If you are using Linux/Unix on your machine, you need to configure your machine to relay messages to your ISP SMTP server. If you are using Windows, you could also configure a local SMTP server to relay the messages to your ISP SMTP server. In either case, the recipient SMTP server may detect that the message was relayed by your local mail server and refuse the message. Even if you are running Windows, configuring PHP to relay the messages sent with mail() directly your SMTP server will not work because PHP mail() function does not support authentication. The simplest alternative solution that will work is to use a replacement for the mail() function that works with the same parameters as mail but talks directly with your ISP SMTP server using your user name and password. The advantage of this is that you only need to rename your mail() calls to the replacement function. This MIME message composing and sending class provides a wrapper function named smtp_mail() that does precisely that. Many people use it to relay messages to their ISP SMTP servers or even Gmail, which also requires authentication. Take a look at the test_smtp_mail.php example script: http://www.phpclasses.org/mimemessage You also need these classes in conjunction to talk SMTP with authentication support: http://www.phpclasses.org/smtpclass http://www.phpclasses.org/sasl -- 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/ |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Manuel Lemos wrote:
> Hello, > > on 02/15/2008 08:07 PM Correia said the following: >> My server is at home, and i can send mails from it. But because they >> are sent from my computer they fail to pass the major spam filters. >> My question is: >> >> Suppose i have an email of a major isp (more chances to pass a spam >> filter): >> >> Email: mymail@isp.com >> Smtp: smtp.isp.com >> password: mypass >> >> Can i use THAT account to send emails from a php script, so they can >> pass more spam filters? > > You can but there are some details. > > If you are using Linux/Unix on your machine, you need to configure your > machine to relay messages to your ISP SMTP server. > > If you are using Windows, you could also configure a local SMTP server > to relay the messages to your ISP SMTP server. > > In either case, the recipient SMTP server may detect that the message > was relayed by your local mail server and refuse the message. > > Even if you are running Windows, configuring PHP to relay the messages > sent with mail() directly your SMTP server will not work because PHP > mail() function does not support authentication. > > The simplest alternative solution that will work is to use a replacement > for the mail() function that works with the same parameters as mail but > talks directly with your ISP SMTP server using your user name and > password. The advantage of this is that you only need to rename your > mail() calls to the replacement function. > > This MIME message composing and sending class provides a wrapper > function named smtp_mail() that does precisely that. Many people use it > to relay messages to their ISP SMTP servers or even Gmail, which also > requires authentication. Take a look at the test_smtp_mail.php example > script: Thanks for that, even tho I am not the original poster. It would seem to reduce dependence on the servers MTA, but does it do it at the price of 'suspending' the script whilst the mail is being sent? > > http://www.phpclasses.org/mimemessage > > You also need these classes in conjunction to talk SMTP with > authentication support: > > http://www.phpclasses.org/smtpclass > > http://www.phpclasses.org/sasl > > |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
The Natural Philosopher wrote:
> Manuel Lemos wrote: >> Hello, >> >> on 02/15/2008 08:07 PM Correia said the following: >>> My server is at home, and i can send mails from it. But because they >>> are sent from my computer they fail to pass the major spam filters. >>> My question is: >>> >>> Suppose i have an email of a major isp (more chances to pass a spam >>> filter): >>> >>> Email: mymail@isp.com >>> Smtp: smtp.isp.com >>> password: mypass >>> >>> Can i use THAT account to send emails from a php script, so they can >>> pass more spam filters? >> >> You can but there are some details. >> >> If you are using Linux/Unix on your machine, you need to configure your >> machine to relay messages to your ISP SMTP server. >> >> If you are using Windows, you could also configure a local SMTP server >> to relay the messages to your ISP SMTP server. >> >> In either case, the recipient SMTP server may detect that the message >> was relayed by your local mail server and refuse the message. >> >> Even if you are running Windows, configuring PHP to relay the messages >> sent with mail() directly your SMTP server will not work because PHP >> mail() function does not support authentication. >> >> The simplest alternative solution that will work is to use a replacement >> for the mail() function that works with the same parameters as mail but >> talks directly with your ISP SMTP server using your user name and >> password. The advantage of this is that you only need to rename your >> mail() calls to the replacement function. >> >> This MIME message composing and sending class provides a wrapper >> function named smtp_mail() that does precisely that. Many people use it >> to relay messages to their ISP SMTP servers or even Gmail, which also >> requires authentication. Take a look at the test_smtp_mail.php example >> script: > > Thanks for that, even tho I am not the original poster. > > It would seem to reduce dependence on the servers MTA, but does it do it > at the price of 'suspending' the script whilst the mail is being sent? > I've never found a server on an ISP which refuses mail from it's users. It doesn't care if the email came from Outlook Express or a local mail server - either one connects via port 25. But the smtp server does require authorization before it will accept email, and this can be more difficult. The best I've found is phpmailer (http://phpmailer.codeworxtech.com/). It handles smtp authentication just fine. There isn't an ISP or hosting company I've been unable to access with this class and the proper authorization. Yes, you do have to wait while the email is being sent to the server, but that's generally pretty quick, unless it's a long message on a slow line. If you don't want to wait, queue the message up in the system and have a cron job or scheduled task run to do the delivery. > > >> >> http://www.phpclasses.org/mimemessage >> >> You also need these classes in conjunction to talk SMTP with >> authentication support: >> >> http://www.phpclasses.org/smtpclass >> >> http://www.phpclasses.org/sasl >> >> > Forget trying to get all this crap working. PHPMailer is much better and does it all. And BTW - he doesn't mention that these are his classes he's advertising. I've looked at the code in some of them. I wouldn't advertise that fact, either. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
on 02/16/2008 08:39 AM The Natural Philosopher said the following:
> Manuel Lemos wrote: >> Hello, >> >> on 02/15/2008 08:07 PM Correia said the following: >>> My server is at home, and i can send mails from it. But because they >>> are sent from my computer they fail to pass the major spam filters. >>> My question is: >>> >>> Suppose i have an email of a major isp (more chances to pass a spam >>> filter): >>> >>> Email: mymail@isp.com >>> Smtp: smtp.isp.com >>> password: mypass >>> >>> Can i use THAT account to send emails from a php script, so they can >>> pass more spam filters? >> >> You can but there are some details. >> >> If you are using Linux/Unix on your machine, you need to configure your >> machine to relay messages to your ISP SMTP server. >> >> If you are using Windows, you could also configure a local SMTP server >> to relay the messages to your ISP SMTP server. >> >> In either case, the recipient SMTP server may detect that the message >> was relayed by your local mail server and refuse the message. >> >> Even if you are running Windows, configuring PHP to relay the messages >> sent with mail() directly your SMTP server will not work because PHP >> mail() function does not support authentication. >> >> The simplest alternative solution that will work is to use a replacement >> for the mail() function that works with the same parameters as mail but >> talks directly with your ISP SMTP server using your user name and >> password. The advantage of this is that you only need to rename your >> mail() calls to the replacement function. >> >> This MIME message composing and sending class provides a wrapper >> function named smtp_mail() that does precisely that. Many people use it >> to relay messages to their ISP SMTP servers or even Gmail, which also >> requires authentication. Take a look at the test_smtp_mail.php example >> script: > > Thanks for that, even tho I am not the original poster. > > It would seem to reduce dependence on the servers MTA, but does it do it > at the price of 'suspending' the script whilst the mail is being sent? I am not sure what you mean. When you relay the message to an SMTP served, usually the message is accepted in the mail server queue and it returns right away. Only later the mail server will deliver the message to the recipient SMTP server. So your script is not delayed too much. >> http://www.phpclasses.org/mimemessage >> >> You also need these classes in conjunction to talk SMTP with >> authentication support: >> >> http://www.phpclasses.org/smtpclass >> >> http://www.phpclasses.org/sasl >> >> -- 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/ |
|
![]() |
| Outils de la discussion | |
|
|