Archived Forum Post

Index of archived forum posts

Question:

How to send email using php extension?

Apr 28 '13 at 03:21

Greetings sir, hope all active use on this community is fine.

i am facing a problem..

i am trying to send email from my website using php extension.

but it's not working :(

here is the last error text message i got:

 ChilkatLog:
  SendEmail:
    DllDate: Oct  5 2012
    UnlockPrefix: [removed]
    Username: host250.hostmonster.com:
    Architecture: Little Endian; 64-bit
    Language: Linux PHP
    VerboseLogging: 0
    recipients:
      TO: [removed]
      totalCount: 1
    --recipients
    renderToMime:
      createEmailForSending:
        xSigningAlg: sha1
        Auto-generating Message-ID
      --createEmailForSending
      renderToMime: Elapsed time: 1 millisec
    --renderToMime
    SmtpConnect:
      SmtpHost: smtp.siamcomputer-bd.com
      SmtpPort: 25
      SmtpUsername: 
      SmtpSsl: 0
      StartTLS: 0
      Need new SMTP connection
      No SMTP login provided.
      No SMTP password provided.
      Skipping SMTP authentication because no login/password provided.
      checkForExistingConnection: Elapsed time: 5 millisec
      SMTP_Connect:
        Connecting to SMTP server smtp.siamcomputer-bd.com:25
        smtp_host: smtp.siamcomputer-bd.com
        smtp_port: 25
        smtp_user: NULL
        auth-method: NONE
        ConnectTimeoutMs_1: 30000
        calling ConnectSocket2
        IPV6 enabled connect with NO heartbeat.
        connectingTo: smtp.siamcomputer-bd.com
        GetHostByNameHB_ipv4: Elapsed time: 885 millisec
        Info: Socket operation in progress..
        myIP_1: 74.220.215.250
        myPort_1: 54374
        connect successful (1)
        socketConnect: Elapsed time: 3885 millisec
        numBytesRequested: 2048
        Connection closed by connected peer.
        Failed to get initial SMTP response..
        Will re-try one time...
        ConnectTimeoutMs_1: 30000
        calling ConnectSocket2
        IPV6 enabled connect with NO heartbeat.
        connectingTo: smtp.siamcomputer-bd.com
        GetHostByNameHB_ipv4: Elapsed time: 0 millisec
        Info: Socket operation in progress..
        myIP_1: 74.220.215.250
        myPort_1: 54377
        connect successful (1)
        Setting TCP_NODELAY
        numBytesRequested: 2048
        Connection closed by connected peer.
        InitialResponse2: 
        Failed to get initial SMTP response again.
      --SMTP_Connect
      checkOrMakeSmtpConnection: Elapsed time: 6891 millisec
    --SmtpConnect
    Failed.
  --SendEmail
--ChilkatLog

Note:

  1. I also tried to send using user name and password too, but same error :(
  2. If i try with c-panel web email client i can send email successfully
  3. My email accounts are registered with Google apps !

so, any help would be highly appreciated :)

thanks in advance..

best regards


Answer

I see you didn't use SSL / StartTLS, those are required for gmail accounts. Also see this post: http://www.chilkatforum.com/questions/2526/tip-gmail-smtp-2-step-verification