• Resolved thefraj

    (@thefraj)


    I’m not sure what’s going on but the email feature of CF7 seems to be utterly broken

    I can easily send email using PHP mail(…) and even match the same from / to and subject line (just to ensure emails are not being spammed) – I then even tried embedding HTML (just to check again, wasn’t getting caught for spam) and all these come through fine

    But nothing appears to come through from CF7 – so far as I can tell it doesn’t even use the To/From fields entered in the form settings

    Naturally since I know emails are working on the host, I’ve then tried updating the to/from addresses but in no cases does anything get sent.

    Any help greatly appreciated

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter thefraj

    (@thefraj)

    Actually, ignore that because I have little faith it can be made to work – could someone let me know where (in code) is the point at which emails should be sent.

    I will write my own code to send them, that way I know it will work – I just need to know which part of the code this should be done in, please

    Many thanks,

    Thread Starter thefraj

    (@thefraj)

    Sorry to keep posting, but I’ve found the snippet of code within CF7 calling wp_mail(…)

    So I then abstracted this into a separate php script and ran it – and it also works fine (I get emails sent with wp_mail(…) too

    What is CF7 doing in addition to this which may be breaking?

    Hello @thefraj,

    Did you try setting up SMTP? Please see I get an error message with a red border. So, how can I solve this?.

    Best regards,
    Yordan.

    Thread Starter thefraj

    (@thefraj)

    Okay I’ve got it working! ??

    Not sure what you’ve done here, but to resolve it I just had to hard code the subject line. You may wish to check this for future releases.

    But to resolve it, I went to:

    /wp-content/plugins/contact-form-7/includes

    Open up mail.php

    And hard-code the subject line (on line 117) where you call wp_mail(…): and it works fine!

    return wp_mail( $recipient, “Subject line here”, $body, $headers, $attachments );

    So there’s something not right about how you are retrieving the subject for the email – or, it’s possible if no subject line was entered (or something similar) the method call may fail

    You may wish to look at that for future releases,

    @thefraj, Many thanks for this workaround.

    @takayukister you guys might need to look into this as I was experiencing the same on a client’s site and this manual fix finally worked and started sending messages out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Emails Not Sending’ is closed to new replies.