email() & port number
Moderator: General Moderators
email() & port number
In my company we have en experimentel smtp-server which runs on port 26. Is there any way to tell the php mail function to use port 26 instead of 25 for sending mail?
greetz
weazel
greetz
weazel
Yeah that would help a lotZmodem wrote:DOH! I misread, sorry.
Get more coffee ... snip
This thing with just attaching the port number to the domain doesn't seem to work. This is a fragment of my script:
Code: Select all
$strSubject = "none";
$strMessage = "some text";
$strHeaders = "From: me@mydomain.com:26\r\nReply-To:webmaster@mydomain.com";
if (!mail($arrayї"eMail"], $strSubject, $strMessage, $strHeaders))
{
// do s.th. special
}- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Mail functions
on unix the local mailer is used. So this one has to be set up to use another port (if it uses sockets to connect the next MTA)...
SMTP string
Used under Windws only: DNS name or IP address of the SMTP server PHP should use for mail sent with the mail() function.
SMTP int
Used under Windws 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.
...
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Damn!
Well, port 26 still doesn't work because of PHP4.2.0
and now port 25 doesn't want anymore too... I think I shot s.th. 
/*add
Now it's working again and with port 26 too
Two new routing rules thats all.
Thanks for your help, pals
*/
/*add
Now it's working again and with port 26 too
Two new routing rules thats all.
Thanks for your help, pals
*/