LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 06-30-2006, 08:33 AM   #1
wadesmart
Member
 
Registered: Jul 2005
Location: Oklahoma
Distribution: Ubuntu
Posts: 72

Rep: Reputation: 15
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
 
Old 06-30-2006, 09:11 AM   #2
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
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.
 
Old 06-30-2006, 10:31 AM   #3
wadesmart
Member
 
Registered: Jul 2005
Location: Oklahoma
Distribution: Ubuntu
Posts: 72

Original Poster
Rep: Reputation: 15
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
 
Old 06-30-2006, 02:22 PM   #4
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
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
Server:         xxx.xx.xxx.xxx
Address:        xxx.xxx.xxx.xxx#53

Non-authoritative answer:
wadesmart.com   mail exchanger = 50 mailstore1.secureserver.net.
wadesmart.com   mail exchanger = 10 smtp.secureserver.net.
 
Old 06-30-2006, 07:06 PM   #5
wadesmart
Member
 
Registered: Jul 2005
Location: Oklahoma
Distribution: Ubuntu
Posts: 72

Original Poster
Rep: Reputation: 15
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
 
Old 06-30-2006, 07:23 PM   #6
wadesmart
Member
 
Registered: Jul 2005
Location: Oklahoma
Distribution: Ubuntu
Posts: 72

Original Poster
Rep: Reputation: 15
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
 
Old 07-06-2006, 03:15 AM   #7
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't send email schawkeye Linux - Software 3 06-09-2006 11:25 PM
php send email parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expect jamesjoy Programming 7 12-06-2005 04:33 PM
email 'send' NO - email 'receive' YES..? captain skywave Linux - Wireless Networking 4 04-23-2005 03:35 AM
email 'send' YES - email 'receive' NO..? captain skywave Linux - Wireless Networking 1 04-22-2005 05:23 AM
Allowing an IP to send email using my email server... culprit Linux - Networking 7 09-09-2003 12:24 PM


All times are GMT -5. The time now is 10:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration