Problem publishing a post via php mail ()
-
Posting via messages from php mail () is not working for me. I sent a message from (email visible only to moderators and staff) to the address (email visible only to moderators and staff), but the post has not been published. Can you help me find out why the message was not delivered to (email visible only to moderators and staff)?
WP.com: Yes
Correct account: YesThe blog I need help with is: (visible only to moderators and staff)
-
Hi there,
To confirm, you are referring to posting by email to the site makula828151216.wordpress.com? Is this your first attempt at ‘post by email’ or has it worked in the past for you but is no longer working?
Have you followed the directions as outlined on our support page here?:
https://wordpress.com/support/post-by-email/
Let me know and we’d be happy to assist you further. Thanks!
-
I have followed the instructions and the publication of the post works when I send a message by e-mail. It doesn’t work when sending a message via the phpmail () function on my website. The shipping script works fine, it just doesn’t work like I’m posting on wordpress.com.
-
Hi there,
I’m not familiar with the phpmail function, but I believe that the email you’re sending from within your site might include content that’s not compatible with the Post by Email feature.
Can you please check if the contents of the email message fall withing the parameters as described in this guide?
-
<?php
ini_set( ‘display_errors’, 1 );
error_reporting( E_ALL );
$from = “(email visible only to moderators and staff)”;
$to = “(email visible only to moderators and staff)”;
$subject = “PHP Mail Test script 3”;
$message = “This is a test to check the PHP Mail functionality”;
$headers = “From:” . $from;
mail($to,$subject,$message, $headers);
echo “Test email sent”;
?> -
I’m afraid that won’t work on WordPress.com. Our Post by Email feature was created specifically to publish posts from email.
-
Can you check the mail log, why can’t the message be sent to (email visible only to moderators and staff) a moment ago?
-
Hi @testtest4534,
The email address that you just shared differs from that in your original post above. Can you please confirm that you’re using the correct email address?
-
-
Could the issue be that the PHP
mailfunction is using Sendmail, which either isn’t enabled or allowed for users?Is there a way to use an authenticated SMTP mail function?
-
@testtest4534 The email was received and discarded. As mentioned, the system is only designed to receive emails sent from email apps or webmail sites.
To prevent spam and abuse, the system discards any emails sent by script.
@ericfri No, there is currently not.
- The topic ‘Problem publishing a post via php mail ()’ is closed to new replies.