• I had to start a new thread, since all the other topics about this issue are closed, so I thought I might shed some light on an alternative reason why you might be receiving this error.

    These are the requirements for this particular issue.

    • You have a dedicated/vps box
    • The box uses the sendmail service
    • The hostname for the box is associated with the domain having issues
    • Sendmail is not configured to only send mail externally

    A quick way to troubleshoot if this could be your problem, is that the contact form 7 works with any e-mail address which is not tired to your website domain. Meaning, that a gmail account with work, but your website at https://www.thisdomain.com cannot send to [email protected]

    You will run into an issue if you use another server as your mail server, meaning a google professional account, or a zimbra server, or a cpanel account (something external to the server you are on)

    If you have shell prompt access, you can also check the /etc/log/mail.log file. If you are having the same issue as me, you will notice that next to each e-mail that you attempt to send, you will notice that next to each mail attempt, the following

    “User unknown”

    With this, we can surmise that the sendmail service is attempting to send mail to itself, bypassing any mx entries that your domain has setup (it is not even checking for it) which some other threads I was reading pointed it.

    If this is the case, you can modify the following files

    First File
    /etc/mail/local-host-names

    If you see your blocked domain in there, remove it and save. It is safe to leave in only localhost (at least that is what my config is now)

    Second File
    /etc/mail/sendmail.mc

    append the following lines to the file, replacing thisdomain.com with your domain having issues. noticing that a period trails each domain name

    define(MAIL_HUB',thisdomain.com.’)dnl
    define(LOCAL_RELAY',thisdomain.com.’)dnl

    Save, Exit

    Run the following command as root

    sendmailconfig

    Finally

    service sendmail restart

    with that being done, try using contact form 7 again to email to your own domain.

    The email should hopefully go through now.

  • The topic ‘Contact Form 7 "Failed to send your message."’ is closed to new replies.