Alex Rivera | Logout

What are the requirements to send an email with PHP?

Asked 2011-01-20T17:48:16.363
11
  • I'm developing a Web application with PHP 5.3.3.
  • I want it to send confirmation e-mails automatically.
  • I don't have a domain name yet.
  • I'm using Windows XP.
  • I don't have PEAR's Mail package.
  • I have hMailServer and is the mail server I want to use to send the e-mails.

My questions are:

  1. Can I send e-mails without a domain name? (Is it absolutely necessary? I just want to test the application for the moment.)
  2. If a domain name is necessary, do I also need to host the application with a Web Hosting Service Provider? Can I do it from my computer?(Remember, I just want to test the application.)
  3. Do I absolutely need the PEAR's mail package? or can I simply use the mail() function?

I'm clueless about what I should do. I've made my research, I understand the parts but I can't make sense of the whole, I mean what resources are necessary and how to put it together. I've never developed any application that sends e-mail before. Please, help me.

Edit
Report

1 Answer

2
  1. Yes. You can set your "from" address to whatever you want. (Though note, the recipient server might detect it's forged and reject it.)

  2. You can host from you computer, just make sure your network is not blocking port 25 outbound.

  3. mail() alone will suffice as long as you have a local SMTP server that will handle your messages. (I'm assuming that's what the hMailServer product is.)

answered 2011-01-20T17:57:47.383

Your Answer