• Hi,

    I am new to WordPress development
    I was trying to send attachment with wp_mail but what i noticed is that when i try
    wp_mail($to, $subject, $message, $headers,$mail_attachment);

    mail goes but without attachment

    And when i do
    @wp_mail($to, $subject, $message, $headers,$mail_attachment);

    attachment goes…

    Any one can tell me why so..???

Viewing 1 replies (of 1 total)
  • In PHP the @ symbol tells the system to disragard any errors that occur on that line. That leads me to think that your call to wp_mail() is generating an error, and you should find out what that error is as that will be the most likely way of finding out what’s stopping the attachment form being sent.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_mail and @wp_mail difference’ is closed to new replies.