Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Send Email
 
PaulE
Member
 
Avatar
Total Posts:  43
Joined:  2008-12-09
 

Im trying to send a email via the “core/template_email” module, but somehow it’s not sending an mail..
I hope somebody can help me out, I’m not sure if I’m using it in the right way:

My module’s config.xml:

<?xml version="1.0"?>
<config>
    <
modules>
        <
Test_Invite>
            <
version>0.1.0</version>
        </
Test_Invite>
    </
modules>
    <global>
        <
blocks>
            <
test_invite>
                <class>
Test_Invite_Block</class>
            </
test_invite>
        </
blocks>
        <
template>
            <
email>
                <
invite_email translate="label" module="invite">
                    <
label>Invite Email</label>
                    <
file>invite_email.html</file>
                    <
type>html</type>
                </
invite_email>
            </
email>
        </
template>
    </global>
</
config>

My Module’s Block:

<?php

class Test_Invite_Block_View extends Mage_Core_Block_Template
{
    
public function sendMail()
    
{
        $emailTemplate  
Mage::getModel('core/email_template')->load('invite_email');

        
$variables = array(
            
'message'        => 'My test message'
        
);

        
$emailTemplate->send("my@email.com"'PaulE'$variables);
    
}
}

And as final touch the Email template (Located: /app/locale/nl_NL/template/email/invite_email.html)

<!--@subject TEST MESSAGE @-->

TEST{{var message}}

Am I doing something wrong, since it’s not displaying any error..

 
Magento Community Magento Community
Magento Community
Magento Community
 
kwolff
Jr. Member
 
Total Posts:  1
Joined:  2009-07-23
 

HI, did you found a solution? I am hanging whith the same proplem.
Thanx,
Kris

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top