Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Irving, TX (Dallas, Fort Worth)
    Posts
    379

    Unanswered: SMTP & Mail Testing

    All,

    I have this .PHP file that I'm testing in localhost and it is a form that sends emails. Obviously, on a WAMP platform, though Apache takes the mail command as a local command, it is not a local command, so I need to somehow associate the Apache mail command to my SMTP to actually get an email to send out.

    I've been looking for example's and help on how to set this up, but not finding any.

    Does anyone know where I can find help resources on this?

    Has anyone done this before, that can help me through the process?

    Thanks!

    DBS4M

  2. #2
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    Either set the SMTP host in php.ini or in the script itself, before the mail(...) function call -
    PHP Code:
    // using the mail server's DNS name
    ini_set('SMTP',"mail.yourdomain.com");
    // or using the mail servers's IP address
    ini_set('SMTP',"xxx.xxx.xxx.xxx"); 

  3. #3
    Join Date
    Feb 2004
    Location
    Irving, TX (Dallas, Fort Worth)
    Posts
    379

    Set and works but not always

    dbmab,

    I set the PHP.ini and mail worked, but I'm trying to send three emails back to back, when the user submits from my online form, and only the first one works.

    The mails I'm sending do:

    1. Thanks for submittal to user
    2. Submittal alert to admin
    3. Submittal to distribution list to handle

    Do you have any advice as to why only the first email send and the others do not?

    DBS4M

  4. #4
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    It could be a logic error (you would need to post your code - xxxxx out any sensitive information) or it could be that the email addresses have a problem and are either causing the mail server to reject them or they are being rejected by the receiving mail server. The email could also be going into a junk mail folder or a catch-all mail box.

    Here is a link to a post on dbforum's sister forum listing common reasons why email might not get sent, not received, or get placed into a junk email folder - http://www.programmingtalk.com/showthread.php?t=31355

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •