WordPress.org

Ready to get started?Download WordPress

Forums

Easy WP SMTP
how to code sendemail? (3 posts)

  1. cwizards
    Member
    Posted 11 months ago #

    What wp/php code do I use to send an email please?
    e.g. something like 'wp_smtp(to,subject,body);' ?
    Nick

    http://wordpress.org/plugins/easy-wp-smtp/

  2. cwizards
    Member
    Posted 11 months ago #

    I have just tried wp_mail(... and got the response below, ant ideas?
    Nick

    SMTP -> FROM SERVER:220 artificialart.co.uk ESMTP
    SMTP -> FROM SERVER: 250-artificialart.co.uk 250-SIZE 20480000 250 AUTH LOGIN
    SMTP -> FROM SERVER:250 OK
    SMTP -> FROM SERVER:250 OK
    SMTP -> FROM SERVER:354 OK, send.
    SMTP -> FROM SERVER:250 Queued (0.202 seconds)
    SMTP -> FROM SERVER:221 goodbye

    Warning: Cannot modify header information - headers already sent by (output started at /home/cowleygr/public_html/wp-includes/class-smtp.php:121) in /home/cowleygr/public_html/wp-admin/post.php on line 222

    Warning: Cannot modify header information - headers already sent by (output started at /home/cowleygr/public_html/wp-includes/class-smtp.php:121) in /home/cowleygr/public_html/wp-includes/pluggable.php on line 875

  3. cwizards
    Member
    Posted 11 months ago #

    I am not sending any header info (just to, subject, body) but I am calling the code from a hook in functions.php which is called when an admin user clicks publish on a post.
    It looks to me as though it is trying to set a cookie or something?
    Nick

Reply

You must log in to post.

About this Plugin

About this Topic