tocleora
July 5th, 2007, 04:08 PM
Not sure if this should go in programming or server, so I thought I'd start here.
I have an internal server with no domain name. I built a ticket system that they want an e-mail sent to their e-mail address (which is on an external server) when someone submits a ticket. However e-mails aren't making it to the external mail server.
I should also mention this is a fedora core 4 box. I'm prepping a ubuntu box to move to but I did try this on it as well and did not receive the e-mail.
The code I'm using in my php file:
mail($mailto, "Testing", "Testing", "From: $mailfrom\nContent-Type: text/plain;charset=iso-8859-1");
where mailto is say "name1@domain.com" and mailfrom is "name2@domain.com", domain.com being the external mail server domain.
I use this code frequently so I'm 99% sure it's not this one (I copy and paste).
I went into php.ini and it has this:
sendmail_path = /usr/sbin/sendmail -t -i
Then I went into webmin sendmail, and added the mail server domain to Relay Domains, I added it in Outgoing Domains, and I added "apache" as a trusted user since it is the account php uses (to my knowledge).
Anything else I'm missing? Is there an alternative way to send this? I tried doing it via telnet as well (using fsocketopen) but php isn't resolving the smtp mail server domain. Any other assistance would be greatly appreciated!
I have an internal server with no domain name. I built a ticket system that they want an e-mail sent to their e-mail address (which is on an external server) when someone submits a ticket. However e-mails aren't making it to the external mail server.
I should also mention this is a fedora core 4 box. I'm prepping a ubuntu box to move to but I did try this on it as well and did not receive the e-mail.
The code I'm using in my php file:
mail($mailto, "Testing", "Testing", "From: $mailfrom\nContent-Type: text/plain;charset=iso-8859-1");
where mailto is say "name1@domain.com" and mailfrom is "name2@domain.com", domain.com being the external mail server domain.
I use this code frequently so I'm 99% sure it's not this one (I copy and paste).
I went into php.ini and it has this:
sendmail_path = /usr/sbin/sendmail -t -i
Then I went into webmin sendmail, and added the mail server domain to Relay Domains, I added it in Outgoing Domains, and I added "apache" as a trusted user since it is the account php uses (to my knowledge).
Anything else I'm missing? Is there an alternative way to send this? I tried doing it via telnet as well (using fsocketopen) but php isn't resolving the smtp mail server domain. Any other assistance would be greatly appreciated!