Unable to send email via contact us form

This topic is: Resolved

This is a PRIVATE forum for verified users only, to view the replies/answers, you must be logged in!

This topic contains 9 replies, has 3 voices, and was last updated by  Jacob 2 years, 5 months ago.

  • Author
    Posts
  • #2938

    Sidewinder1103
    Member
    Post count: 20

    Hi,

    I created a contact us page using the Contact page template. When I fill it in and click send, the contact form says that the message was sent successfully, but I’m not receiving any mail at the recipient address specified in the theme options panel.

    If I create another contact us form on another test page just using the contact form 7 shortcode, then that form is working and I’m able to receive emails from there.

    Any idea why the contact form generated by the template is not working? It’s urgent, I would really appreciate some quick help on this one!

    I’m using Creatiz 1.0.9 with WordPress 3.9.1.

    Thanks!

  • #2939

    Sidewinder1103
    Member
    Post count: 20

    Update: I tested the contact template page with Creatiz 1.0.4, it’s working with that version, but not with later versions of Creatiz.

    Could it be due to a bug in the latest theme?

  • #2941

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #2989

    Sidewinder1103
    Member
    Post count: 20

    @Maxxi I hope you are able to see the user I created for you, I’ve marked the previous post that has the username and password above as private.

    Thanks

  • #3031

    Jacob
    Staff
    Post count: 2312

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #3142

    Jacob
    Staff
    Post count: 2312

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #2962

    Sidewinder1103
    Member
    Post count: 20
    This reply has been marked as private.
  • #3045

    Sidewinder1103
    Member
    Post count: 20

    Hi @jacob

    Can you explain what you mean when you say:

    or flush these specific files:

    http://moosin.net/wp-content/themes/yeahthemes-sparkle/js/yt.custom.min.js
    http://moosin.net/wp-content/themes/yeahthemes-sparkle/js/yt.custom.js

    Do you mean I delete those files from my theme folder? I can’t find them in the creatiz theme.

  • #3108

    Sidewinder1103
    Member
    Post count: 20

    @jacob

    I think I found the cause!

    I was looking through the files in cPanel (I am hosted on Namecheap by the way) and I noticed this:

    
    Return-path: <>
    Envelope-to: [email protected]
    Delivery-date: Fri, 06 Jun 2014 22:17:29 -0400
    Received: from mailnull by server94.web-hosting.com with local (Exim 4.82)
    	id 1Wt6CH-000rdu-09
    	for [email protected]; Fri, 06 Jun 2014 22:17:29 -0400
    Auto-Submitted: auto-replied
    From: Mail Delivery System <[email protected]>
    To: [email protected]
    Subject: Mail failure - rejected by local scanning code
    Message-Id: <[email protected]>
    Date: Fri, 06 Jun 2014 22:17:29 -0400
    
    A message that you sent was rejected by the local scanning code that
    checks incoming messages on this system. The following error was given:
    
      "Relaying not permitted"
    
    ------ This is a copy of your message, including all the headers. ------
    
    Received: from cushxytj by server94.web-hosting.com with local (Exim 4.82)
    	(envelope-from <[email protected]>)
    	id 1Wt6CG-000rdr-V8
    	for [email protected]; Fri, 06 Jun 2014 22:17:28 -0400
    To: [email protected]
    Subject: [Contact form]Another Test
    Date: Sat, 7 Jun 2014 02:17:28 +0000
    Return-Path: <[email protected]>
    From: Vikas <[email protected]>
    Message-ID: <[email protected]>
    X-Priority: 3
    X-Mailer: PHPMailer 5.2.7 (https://github.com/PHPMailer/PHPMailer/)
    Reply-To: [email protected]
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Sender:  <[email protected]>
    
    Name: Vikas 
    
    Email: [email protected] 
    
    Comments: Message

    Do you have any suggestions?

    **UPDATE**

    Just confirmed – Namecheap hosting does not allow any email to be in the “from” field – the address must be from your own domain. I tried putting “[email protected]” in the from field and I instantly got the email. But if I use anything else, such as @gmail.com in the from field, it gets blocked by Namecheap.

    Is there a way I can make the contact form always have the sender as your own domain? So for example all the emails sent by the contact form will appear as coming from [email protected].

  • #3117

    Sidewinder1103
    Member
    Post count: 20

    @jacob @Maxxi

    Sorry for the double-post. Namecheap support pointed me to this article, hopefully this should help you:

    https://www.namecheap.com/support/knowledgebase/article.aspx/9239/31/contact-forms-with-namecheap-webhosting-servers

    I like your Contact page template, so I want to use that. The only change needed is that the sender email address should not be what the user enters in the field, but it should be from my own domain. User’s email can be the reply-to address.

    ===============================
    @jacob
    @Maxxi
    UPDATE: I found a solution!

    Since Namecheap only allows email to be sent by a sender from within my domain, I had to make a small change to your template-contact.php. In line 71, I changed this:

    $headers = __( 'From: ', 'framework') . "$name <$email>" . "\r\n" . __( 'Reply-To: ', 'framework' ) . $email;

    To this:

    $headers = __( 'From: ', 'framework') . "$name <[email protected]>" . "\r\n" . __( 'Reply-To: ', 'framework' ) . $email;

    This makes the “From:” address appear as [email protected], which is my domain, instead of what the user inputs into the form. The reply-to address is still the user’s address. Now it works!

    This issue is not so common, but as a suggestion, maybe in a future update could you please integrate the functionality of letting us change this in the theme options panel? Customizing the default subject, formatting of the email, sender address etc. It may be useful.

    If anyone reading this has had the same issue as me, I hope this helped you.

    • This reply was modified 2 years, 5 months ago by  Sidewinder1103. Reason: Solved the problem
    • This reply was modified 2 years, 5 months ago by  Sidewinder1103. Reason: Solved the problem

You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view the replies/answers, you must be logged in!