I am using PHPMailer 5.2.9 and trying to send out a newsletter. Having trouble with mail delivering issues if the body text contains the words late and Soma. e.g.
$message='Son of late Josinho Soma Project';
If either of the words late or Soma is taken off, the email is delivered successfully. I have also tried changing Soma to Somm as below and could see the email was delivered.
$message='Son of late Josinho Somm Project';
I have also tried sending out the same text using a simple PHP mail function having no issues. Not sure, what is causing the issue with the PHPMailer class.
Related
xample#gmail.com
X-CMAE-Envelope: MS4wfP8FXd8/R+a/LSU6TL5fZ2U9j6XNOlqH2ChNeZRC9M65GyLWs79yxh/WSVP1mWgmTrSR1jubA85EorlFhPmvIANJv+g8Dvba+4+i5Epzjt6Q3cuOetV2
yQT63E6PAR3l9SpC0BsxP9MXrvBLXdYDMIrGANJWNZNOR8b5focPdjP4
[Mail Message]
Whenever I send a mail using PHP, X-CMAE-Envelope is automatically adding in mail body. How can I remove it?
It has been a while ago since this was asked, but if someone else gets the same problem:
I noticed that the envelope message disappears when you start the message body with an extra empty line.
\r\n\r\n Marks the end of the headers and start of the message body.
CMAE stands for Cloudmark Authority Engine and is an e-mail security product (anti-spam). This and others headers are added by this software at a server level. You should check it with your sysadmin.
https://www.cloudmark.com/en/knowledgebase/cloudmark-authority-for-spamassassin/Order-of-startup-for--CMAE-spamd-and-the-MTA
This is not a direct answer, but I didn't find much on the web for this.
While using Python sending an email through gmail to a user#vzpix.com email, it appears the message included the X-CMAE-Envelope based on what the message was. If the message was not only text but included a date and time - then it included the X-CMAE-Envelope otherwise it was not included. With that being said, it appears server-based.
I know this was from a while ago but I recently had the same issue, specifically a colon ":" triggers this. But if you just start your message with \n it fixes it
Okay. So what i did was that i retrieved the body of an email using imap_fetchbody and forward the contents in it to another user's email using mail->Body.
The following are the 2 different formats of the mail i get from different settings:
eg1:
mail->isHtml(true);
eg2:
mail->isHtml(false);
The result i want to have is eg2 but i need to insert html code into the mail itself hence i cannot have mail->isHtml(false), i need it to be true. I'm not sure why this is happening but i realize that the cause in difference in formatting is due to this mail->isHtm() property.
What can i do?
Any help here will be greatly appreciated.
I just want to ask because I tried to send an email with a link. The problem is the link.
http://mysite/samplesite/login/confirm_email/qwVBEkXFqCp9BQLvKWNBPpWzOo2Ryx
becomes
http://mysite/samplesite/login/confirm_email/qwVBEkXFqCp=BQLvKWNBPpWzOo2Ryx
As you notice, the 9 became =.
I tried changing my mailtype as text and it work but how to solve it having mailtype as html?
I use the PHP Mailer for send email... Thats already makes the necessary settings for authentication and integrity of your email code in html. Always works for me.
Download PHPMailer: http://sourceforge.net/projects/phpmailer/
How to use: http://phpmailer.worxware.com/
Can I send a text message using PHP or PHPmailer and in the return use a phone number and not an email?
PHP mail() and PHPmailer makes me use a valid email with an "#" symbol. Is there a way around this?
You can put whatever you want in the from field, but don't expect your mail server, or the receiving mail server to accept it.
Better to set your from: field to something like this instead:
"123-123-1234 <noreply#yourdomain.com>"
That way, you can have a valid from address, and still display a number to the end user.
I'm using Zend_Mail and the following code to send my email messages.
$mail = new Zend_Mail('UTF-8');
$mail ->setBodyText($plainBody)
->setBodyHtml($htmlBody)
->setSubject($subject)
->setFrom(FROM_ADDR, FROM_NAME)
->addTo($email, $name )
->addHeader(MY_HEADER, serialize( array( 'foo' => 'bar' ) ) )
;
I need to check the spam rating for the prepared message and I'd like to do it using SpamAssassin.
I thought to create a file with the contents and running something such as exec('spamc $filename'), but how to get the file content with the full MIME body?
I noticed that there's a _buildBody() function in Zend_Mail_Abstract class (library/Zend/Mail/Transport/Abstract.php) that's return that, but that's a protected function.
Thanks
If you want to use SpamAssasin, then run your email message through spamc:
http://spamassassin.apache.org/full/3.1.x/doc/spamc.html
Spamc is the client half of the spamc/spamd pair. It should be used in
place of spamassassin in scripts to process mail. It will read the
mail from STDIN, and spool it to its connection to spamd, then read
the result back and print it to STDOUT. Spamc has extremely low
overhead in loading, so it should be much faster to load than the
whole spamassassin program.
You can do use in PHP by:
Writing the message into a temporary file and running shell_exec('spamc < message.tmp'), or
Running the command with proc_open() then send message via STDIN.
I am assuming you want to simulate a spam check on the recipient's end. That's an interesting idea, but note that the results it will give you will be far from 100% realistic. After all, it's the sending process that adds much of the vital information that helps determine whether an E-Mail is spam (e.g. the sender IP and routes.)
Anyway, to do this, you will probably have to implement a custom Zend_Mail_Transport class, based on the example of Zend_Mail_Transport_Smtp. Any data that transport class sends to the SMTP server, you would have to re-route to a text file. As far as I can see at a cursory glance, it's going to be a bit of work but not impossible.