0

All emails from my custom module are marked as spam. Already put the necessary headers but still didnt work. Anyone can help me to fix this?

Also, I have tried installing different modules for custom form but they're always have errors. Saying they cant find helper data file. argh!

Thanks in advance!

3
  • Only your modules emails marked as spam? The transactional emails works fine? You can show us the email content?
    – osrecio
    Commented Aug 15, 2014 at 7:21
  • yes, transaction emails works fine. here are the contents: Why is this message in Spam? It's similar to messages that were detected by our spam filters. Learn more Name: Testname Email: [email protected] Phone Number: 111-111-1111 Fax: 2647-234 Address #1: test add 1 Address #2: test add 2 City: test cty State / Province / Region: test statee Postal / Zip Code: 26578 Country: Singapore Comments: this is just a test comment Commented Aug 15, 2014 at 7:47
  • This question appears to be off-topic because it is not Magento related. Commented Dec 3, 2014 at 12:30

1 Answer 1

1

Send email to any of the spam detecting service like http://www.emailspamtest.com to check it spam rate and possible issues.

It can be wrong headers and encoding, stop words in the subject and the body, no text part in html emails, too many images comparing to the text size.

Also try to use smtp server instead of default mail function.

Edit:

Here is the full code to send transactional email in Magento:

public function sendTransactionalEmail()
{
    // Transactional Email Template's ID
    $templateId = 1;

    // Set sender information          
    $senderName = Mage::getStoreConfig('trans_email/ident_support/name');
    $senderEmail = Mage::getStoreConfig('trans_email/ident_support/email');    
    $sender = array('name' => $senderName,
                'email' => $senderEmail);

    // Set recepient information
    $recepientEmail = '[email protected]';
    $recepientName = 'John Doe';       

    // Get Store ID    
    $store = Mage::app()->getStore()->getId();

    // Set variables that can be used in email template
    $vars = array('customerName' => '[email protected]',
              'customerEmail' => 'Mr. Nil Cust');

    $translate  = Mage::getSingleton('core/translate');

    // Send Transactional Email
    Mage::getModel('core/email_template')
        ->sendTransactional($templateId, $sender, $recepientEmail, $recepientName, $vars, $storeId);

    $translate->setTranslateInline(true);   
}

Hope this helps.

7
  • uhm can you give the link of spam detecting service, please? tried smtp server but still emails are flagged as spam. Commented Aug 15, 2014 at 7:52
  • When the server marks an email as spam, it often send a reason. Is it your case?
    – Amasty
    Commented Aug 15, 2014 at 7:58
  • Have updated the answer with the first service the google shows me
    – Amasty
    Commented Aug 15, 2014 at 8:01
  • thank you! this is the result: No potential spam-related issue found in your links. RE:When the server marks an email as spam, it often send a reason. Is it your case? -does this mean that I have to check the reasons in my cpanel? btw, Im using gmail as the recipient. Commented Aug 15, 2014 at 8:07
  • uhm do you know how can i use transaction email for my custom form module? noob here, just fyi. Commented Aug 15, 2014 at 8:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.