search
top

Add attachment to order email in Magento

Many times there arise the need to attach files to the order mail. I am giving here a brief explanation for this: I have used Magento ver. 1.7.0.0 ( In previous version there was no mailer class). 1) Rewrite Sales Class Copy the file found at app\code\core\Mage\Sales\Model\Order.php to app\code\local\Mage\Sales\Model\Order.php Overwrite the `sendNewOrderEmail()’ method found. Here you need to...
read more

Form in Magento

Hello All, Many of you who are working in Magento might have come accross the need to make custom form for getting user data. I am writing here an example to display form (with validation) for submitting basic info and send a mail on the email submitted. Suppose the from need to be displayed at this url -> http://youmagentohost/formurl/ <?php $url = Mage::getBaseUrl().'requestfrm'; //below...
read more

Mail in Magento

While working in Magento eCommerce, many times need arises to send mail from within custom modules. Magento is based on Zend, Zend has a class defined for doing this. I am listing here the method for sending mail. < ?php $to_email = ‘test@test.com’; $to_name = ‘to name’; $subject = ‘Mail Testing’; $Body = “Sending mail from magento”; $sender_email = “sender@sender.com”; $sender_name...
read more

Mail in PHP

I am listing here the method for sending mail using PHP code. This will be useful in many ways, for example when you want to sent mail after say a form is submitted. Note: This may work in local , but I am suggesting you to execute on live server. <?php ini_set("SMTP","mail.yoursitename.com"); //this is in general case, put here the SMTP address. ini_set("SMTP_PORT",25);...
read more

Send email from components

While working in Joomla CMS, many times need arises to send mail from the components. Joomla has a class defined for doing this. I am listing here the method for sending mail. <?php $admin_email = ‘test@test.com’; $subject = ‘Mail Testing’; $Body = “Sending mail from component”; $sender_email = “sender@sender.com”; $sender_name = “Sender Name”; $mail = &JFactory::getMailer();...
read more

top