I’m working on my first PHP project, and it’s going well. I’ve been able to figure out how to do most of what I need so far, but there’s one big problem for me now: E-mail.
I’m on a shared server, so I can’t install PEAR, and I can’t modify my php.ini. According to my host’s very limited documentation, I have to use SMTP so I can’t (correct me if I’m wrong) use the mail() function. So does anyone have any suggestions on what to do? At this point I just want to send a basic text message, so where would I specify my SMTP port number, user, password and so on? Thanks
Chances are that your provider has configured the
mail()command already to it uses the right SMTP server. Providers usually do that. I would try that out first.If it really doesn’t work that way, use a mailer class like phpMailer. With that, you can specify the exact SMTP server to use.