Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo "start mail";
- echo "<br>";
- ini_set('memory_limit', '500M');
- ini_set('max_execution_time', 0);
- error_reporting(E_ALL | E_STRICT);
- ini_set('display_errors', 1);
- require_once 'app/Mage.php';
- umask(0);
- Mage::app();
- try {
- $post['name'] = 'vaibhav';
- $post['email'] = 'vaibhavahalpara@gmail.com';
- $post['telephone'] = '123456789';
- $postObject = new Varien_Object();
- $postObject->setData($post);
- $mailTemplate = Mage::getModel('core/email_template');
- $mailTemplate = Mage::getModel('core/email_template');
- $mailTemplate->setDesignConfig(array('area' => 'frontend'))
- ->setReplyTo('vaibhavahalpara@gmail.com')
- ->sendTransactional(
- Mage::getStoreConfig('contacts/email/email_template'),
- Mage::getStoreConfig('contacts/email/sender_email_identity'),
- 'vaibhavahalpara@gmail.com',
- null,
- array('data' => $postObject)
- );
- if (!$mailTemplate->getSentSuccess()) {
- throw new Exception();
- }
- echo "sent";
- } catch (Exception $e) {
- echo "string11465";
- echo $e->getMessage();
- }
- $msg = "First line of textnSecond line of text";
- $msg = wordwrap($msg,70);
- mail("vaibhavahalpara@gmail.com","My subject",$msg);
- $result = mail(
- $this->recipients,
- $this->_mail->getSubject(),
- $this->body,
- $this->header
- );
- echo $result;
Add Comment
Please, Sign In to add comment