Ok guys,
I am going to ask a question I’ve been avoiding for ages. As a learner to php I have made do with simple projects and have never set up any mail servers. Now I need to have an outgoing mail server defined for my first real project so I can’t put it off any longer!
How do I configure an existing email address to be an outgoing mail server? I need one to use the mail() function, right?
What is the difference between POP3 and SMTP?
eeek please be basic with your answers!
This might not be a perfect explanation but basically:
SMTP: Outgoing server - You connect to it, transfer your email and it will send / deliver it.
POP3: Is where your mail is delivered to and held until you download it to your mail program or online mail provider.
To setup outgoing mail your linux hosting will normally have sendmail available for you to use. IF you’re using a wamp setup on windows you can get a program called fake sendmail which works the same way but you’ll need to configure a SMTP host for it to connect to. You then use php the same way to send mail using the mail() function.
What kind of project are you working on? Are you going to need to just send mail, or also receive and store them?
If you just need to be able to send them, you just need to install sendmail (as tangoforce mentioned). With sendmail (and the mail function) you can pretty much specify anything as the “from” email and make that pretty easy.
Installing sendmail is a super simple process (at least in a Linux server, never done it in a Windows environment). If you tell us your actual OS, we can be more specific.
If you need to actually receive and store them, you’ll need an actual “mail server”, you’ll have to install an actual email server, which there are quite a few of.