• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

making php mail() use external smtp server

Red Squirrel

No Lifer
I have this custom mailing list script I made and it uses mail(). One thing is php mail() uses the local server as smtp. Lot of spam blockers will block that since it looks like its a spammer sending locally. I want to specify an external smtp server. How would I go about doing that? theres options in php.ini but for some reason its win32 only.
 
Thats how its setup now, but I want to totaly bypass my local SMTP server. I had to recently change the way I send mail (used to do it locally) due to more and more spam filters looking for that, which really makes sense since lot of spammers probably setup their own servers.

A mail header right now shows that its been relayed through my local domain and my local internal IP. I don't want that, I want it to show up as either my ISPs, or my web host's. (probably my web host, for my case)

I'm thinking I need to use a sendmail argument to specify smtp, just not sure what.
 
No SPAM filter that I know of cares where the first or any intermediary hops come from, just the server that's connecting directly to them to deliver the message.
 

Uhh, no.

SMTP string

Used under Windows only: host name or IP address of the SMTP server PHP should use for mail sent with the mail() function.
smtp_port int

Used under Windows only: Number of the port to connect to the server specified with the SMTP setting when sending mail with mail(); defaults to 25. Only available since PHP 4.3.0.

 
sorry, didn't read that one thoroughly.

a few minutes on google found these:

create your own mail function, use that in place of built-in mail() => http://www.webmasterworld.com/forum40/1178.htm

use sendmail as a relay agent - this may or may not fit your needs for header modification => http://cri.ch/linux/docs/sk0009.html

personally I like the first - it's quick and easy and you KNOW it will work (provided you can hit your external SMTP system through a socket)

again, sorry for the oversight.
 
Back
Top