CUNY Developers Forum

Public Group active 1 year, 3 months ago

Configuring PHP to Send Mail

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12831
    Josh Tankel
    Member

    One of my colleagues here is building a simple PHP-based web site. When trying to send mail he gets an error:

    Warning: mail() [function.mail]: SMTP server response: 530 SMTP authentication is required…

    We don’t have much PHP expertise. Can anyone out there help?

    #19191

    I think that the mail() function doesn’t allow for the arguments you need to do SMTP authentication. You might need to get another mail package. Check out this link: http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm

    #19192

    Josh, you’ve solved my problem. I was using $to = “mygmail”…I changed that to my server email…and everything works. I couldn’t use the outside email.

    Thank you Boone for the quick response.

    #19193

    Awesome, glad it worked, Berlin!

    #19194
    Josh Tankel
    Member

    Just to clarify: Berlin discovered that his SMTP server only permits outbound, unauthenticated mail to recipients in its own domain. He was using a test account outside of the server’s domain, that’s why it required authentication. When he changed the recipient, it worked fine.

    The link that Boone provided sure enough shows you how to authenticate send mail requests in PHP. Looks pretty easy to do. I don’t know PHP but it looks very similar to Perl.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.