2019-09-20 - hschneider, Admin
Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.
XMail Forum · Newbies read here ! All about SMTP,MX-Records,DNS etc. | Help Search Members Calendar |
Welcome Guest ( Log In | Register ) | Resend Validation Email |
Nuclear-Ping |
Posted: Apr 28 2004, 08:49 PM
|
Newbie Group: Members Posts: 21 Member No.: 1087 Joined: 28-April 04 |
Hi all,
I'm new to XMail and was able to successfully set it up the last 5 hours and it works now very very good, SMTP with SMTP-Auth and POP do their service fine. But the only problem I have left is that I cannot send mails using the PHP mail () function. It tells me no error but also no mails ever arrive. I already used the XQM, the que is empty and all other Mails I sent (for example with Outlook) arrive immediately and when I send mails to the server they also arrive immediately. But PHP loose them somewhere ... somehow ... Our Server: - Windows 2000 Server - Apache 2.0.48 - PHP 4.3.6 - XMail 1.18 Before recovering XMail I was running IIS HTTP and IIS SMTP Server on the machine (but had Apache installed long before) and sending mails with PHP mail () was no problem there. What can I do? I already searched around and read related topics, but found no solution. Configuration seems to be OK since all other things work well and I don't want to use the SMTP-class hschneider provided in one posting, because there are several things hosted on the server which just cannot be changed since they do not belong to us. Thanks in advance, Mario |
hschneider |
Posted: Apr 28 2004, 09:03 PM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Checkout this one:
http://xmailforum.homelinux.net/index.php?showtopic=1545 -------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
Nuclear-Ping |
Posted: Apr 28 2004, 11:57 PM
|
Newbie Group: Members Posts: 21 Member No.: 1087 Joined: 28-April 04 |
Hi and thanks!
Yes, I already did. Thats why I said "... I don't want to use the SMTP-class hschneider provided in one posting ..." Sorry, but this thread was no solution for me, since I cannot just replace existing codes which are owned by customers with the SMTP-Class. Isn't there a plain solution just without using 3rd Party PHP Code? I mean, using IIS' SMTP worked without any problems providing localhost as SMTP Server in the PHP.INI. It also must / should be possible with XMail, shouldn't it? Greetings, Mario |
hschneider |
Posted: Apr 29 2004, 07:09 AM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Sorry - been reading too fast ..
Can you post me some example script + your php.ini ? -------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
hschneider |
Posted: Apr 29 2004, 07:27 AM
|
||||
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Just checked it out on my machine (WinXP + XMail 1.18 + PHP4.3.4): works without any problems. Make sure that 'sendmail_from' is set to a valid value in your PHP.ini. It's default is postmaster@localhost, which is rejected by most recipient servers, because RDNS lookups fail. Further pls make sure, that the machine on which your script is executed, is allowed to relay without SMTP auth. This requires an entry in smtprelay.tab. Have again a look at your php.ini. If SMTP is e.g. set to localhost, you need to add "127.0.0.0" "255.255.255.0" to your smtprelay.tab Here is my example script:
You can also force sendmail_from directly from your script:
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
||||
Nuclear-Ping |
Posted: Apr 29 2004, 09:16 AM
|
Newbie Group: Members Posts: 21 Member No.: 1087 Joined: 28-April 04 |
OK, lol, my fault.
Now it works. The error was: in PHP.ini - SMTP was not set to localhost but to the inet hostname of server, I changed it when trying to find the error - send_from was not set to a valid host (fictive host), because IIS didn't care about this (wasn't configured to) in smtprelay.tab: I once tryed this combination, but with "127.0.0.1"[TAB]"255.255.255.0"[RETURN], but that didn't work, because PHP was still not configured correctly. Now I set SMTP to localhost and send_from to postmaster@ourdomain.tld in PHP.ini, smtprelay.tab to "127.0.0.0"[TAB]"255.255.255.0"[RETURN], restarted all the stuff and now it works! Thanks alot for the help. Greetings, Mario |
hschneider |
Posted: Apr 29 2004, 09:18 AM
|
||
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Fine! Your're welcome ... --------------------------------------------------------- Additional info: Make sure, you call mail() like this:
where $FROM holds the address which should appear in the envelope. $HEADERS can hold additional headers or can be empty. -------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
||