I need to send email from PHP - How can I do this easily?
06302006 0829 GMT-6
This new thread was acting started as another one but, this more explains what is wrong. Im working on fixing the local public schools messed up online system. A lot of the online apps need to be able to send mail. I havent wrote any code to send mail before - mainly because getting it all set up has always been a pain. I want to have the ability to test the apps that I build on my computer so, I want to set this up. All my books say sendmail but I was told Ubuntu uses Postfix. I read some of the documentation and I just do not understand. This is what I want to do. I want to send email to my own email account for testing. Is this possible? Isnt there an easy way to do this? Wade |
Check out the mail function.
BTW, this should have been posted in the Programming forum, not the Ubuntu forum as this is not specific to Ubuntu. |
Well, it is a programming question but its not the programming part that I need help with.
I know about the php mail function. I used it and nothing happened. After some searching I found in my mail log: Jun 30 08:08:09 localhost postfix/smtp[26616]: 8E31018B41F: to=<wade@wadesmart.com>, relay=none, delay=215374, status=deferred (Host or domain name not found. Name service error for name=wadesmart.com type=MX: Host not found, try again) So, isnt this a mail question? If not - then Im sorry for the incorrectly posting in the wrong forum. Its just getting some mail application to simply send some mail so I can get back to work. Wade |
Ah, I misinterpreted exactly what your problem was from what you said in your first post - apologies.
The error message suggests that Postfix can't find the MX records for wadesmart.com (which do exist, I've just checked). Which either means that (a) your DNS isn't working correctly or (b) your network connection isn't working correctly. Try running the following command manually from a terminal - do you get the following? Code:
[david@malvern ~]$ nslookup -type=mx wadesmart.com |
Well, there wouldnt be for wadesmart.com. I have that domain for my email only, and its hosted at Godaddy.
Stop. Lets start again. My computer runs Ubuntu 5.10. I am working on some apps for the school and I have to be able to test the pages that send mail. How can I do this from my system? I know that I have postfix on my system. I do not know how to set that up. Is there an easy way to do this? Wade |
Sorry, forgot to answer your question.
when I type nslook I get my current ip address for server and address. ** server cant find wadesmart.com NOTIMP wade |
Have you got postfix installed? If so, it should pretty much work out of the box.
Can you try using your PHP page to send an e-mail to a domain which will have ultra-reliable DNS such as gmail.com or hotmail.com and see if that works? That will help us establish whether it's all DNS resolution that doesn't work, or just some domains, or something else entirely. |
All times are GMT -5. The time now is 03:47 PM. |