Yii Framework Forum: SimpleMailer Forum Board - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

SimpleMailer Forum Board The Forum Board for the SimpleMailer extension Rate Topic: -----

#21 User is offline   vrooomm 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 13-July 12

Posted 23 August 2012 - 02:39 PM

thanks for the reply .. so i dont have to go http://localhost/atl...s/SimpleMailer/ ... this is wrong right .. if i directly try to go to simplemailer it says it dosent exist .... yea can you send me the code which renders the simplemailer in coloumn2 .. also i dont have a casesensitive so the default would be true right ... or do i have to define a casesensitive ??? and if you can send a small example code that would be of great help ... thanks a lot
0

#22 User is offline   chirvo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 72
  • Joined: 30-November 10
  • Location:Venezuela

Posted 23 August 2012 - 03:13 PM

Check the url you're typing. Why are you including "protected/modules" in it? It is just "http://localhost/SimpleMailer".
0

#23 User is offline   vrooomm 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 13-July 12

Posted 23 August 2012 - 04:10 PM

http://localhost/SimpleMailer says it dosent exist .. how do i render in column2 ... ??
0

#24 User is offline   chirvo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 72
  • Joined: 30-November 10
  • Location:Venezuela

Posted 23 August 2012 - 08:54 PM

Let's just forget about the view layout (the column2 thing). Check your installation of SimpleMailer. Be sure you're following to the letter the installation instructions because seems like it is not installed at all.
0

#25 User is offline   vrooomm 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 13-July 12

Posted 24 August 2012 - 01:40 PM

i installed it again man ... i am still confused with crontab command ... how to save it ??
but i should be able to access simple mailer .. which i am not able to do so .... can you please create a demo of simple mailer or something ... i am sorry i am asking for a lot .. but i have tried almost everything i knew and it still dosent work .. i need to implement this .. please help me with this .. thanks a lot ..
0

#26 User is offline   chirvo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 72
  • Joined: 30-November 10
  • Location:Venezuela

Posted 25 August 2012 - 12:19 PM

If you're using Windows I'm afraid I can't help you since I use Linux. You always have Google to find out how to do things.

I'm gonna give you some instructions, however.

For crontab, at the console type:

crontab -e


Copy and paste the crontab lines into the editor and then save.

The installation document is quite explicit. I can't tell you more because already everything is there. Also I can't give you a 'example code' because all you need to know is exactly in the documentation.

Look for someone there were you work for help on how to do the required things in Linux.

I'm sorry I can't give you any more help.
0

#27 User is offline   yugene 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 504
  • Joined: 08-August 09

Posted 30 August 2012 - 10:01 PM

View Postvrooomm, on 24 August 2012 - 01:40 PM, said:

but i should be able to access simple mailer .. which i am not able to do so

Please post your config file to check it doesn't contain probable problems.



0

#28 User is offline   vrooomm 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 13-July 12

Posted 31 August 2012 - 08:03 PM

hey chirvo you were right .. i was following the instructions but somewhere i was making a mistake .. so the simple mailer works nicely thanks a lot ..
i still have 2 questions :
1- how to send different templates to different users .
2- and when i copy the link to the body it just send the link in the mail .. i want to send the page .. what am i doing wrong here ?
0

#29 User is offline   chirvo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 72
  • Joined: 30-November 10
  • Location:Venezuela

Posted 03 September 2012 - 06:33 AM

Good day all,

@vrooomm, here your answers:

1.- Create different mailing lists for your user groups or whatever logic you're using to classify your users. Please read this.

2.- You must paste the page contents, not its origin url. Pay attention to the first two steps on the "Usage" part on the SimpleMailer documentation.
0

#30 User is offline   grod 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 10-October 12

Posted 11 October 2012 - 09:28 PM

Hey, for a solution to the limitation not being able to send to a list with a template, its simple, just add the name, lastname, etc fields in the same "SELECT email,name,etc FROM profile WHERE location='atlantis';" sql query, and just fetch those values
0

#31 User is offline   chirvo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 72
  • Joined: 30-November 10
  • Location:Venezuela

Posted 12 October 2012 - 11:11 AM

View Postgrod, on 11 October 2012 - 09:28 PM, said:

Hey, for a solution to the limitation not being able to send to a list with a template, its simple, just add the name, lastname, etc fields in the same "SELECT email,name,etc FROM profile WHERE location='atlantis';" sql query, and just fetch those values


Interesting. I can map the table columns names to template variables, as in 'name' would map to __NAME__. That, as you say, will definitely overcome the limitation of not being able to personalize emails when sending to a list.

Thank you. That's a simple, clever solution. I'll implement this as soon as I can.

Stay tuned!
0

#32 User is offline   YII_developer_in_UA 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 25-October 12

Posted 25 October 2012 - 09:12 AM

please help me.
Database has a record of sending letters (Table sm_queue).
cron to contain the string
0,30 **** /var/www/*****/***********/protected/yiic mailer

But the letters are sent.

Sorry for my english
0

#33 User is offline   chirvo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 72
  • Joined: 30-November 10
  • Location:Venezuela

Posted 25 October 2012 - 12:05 PM

View PostYII_developer_in_UA, on 25 October 2012 - 09:12 AM, said:

please help me.
Database has a record of sending letters (Table sm_queue).
cron to contain the string
0,30 **** /var/www/*****/***********/protected/yiic mailer

But the letters are sent.

Sorry for my english


If you followed the instructions to the letter you shouldn't have any issues. If your app is not sending mail perhaps is because you or your system administrator didn't configure properly your MTA.

Cheers.
0

#34 User is offline   chirvo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 72
  • Joined: 30-November 10
  • Location:Venezuela

Posted 07 November 2012 - 04:09 PM

Hi guys,

There's a new version of SimpleMailer at GitHub. Consider it unstable. If you're gonna test it I'll be glad to hear you guys giving me feedback.

The new things are:

- Now Mailing Lists support template vars (thanks to @grod for the idea).
- Classes were renamed, stripping the 'Simple' prefix.
- Now the installation should be in the 'modules/mailer' folder, solving the issue of the case sensitive URLs (@yugene discovered the issue months ago).
- Changed the titles/link texts for the views to make them more consistent.

I'm going to test it for a while. In a week or so I'll be launching a new version of SimpleMailer if everything goes well.

Cheers,
0

#35 User is offline   SteveD 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 26-April 12
  • Location:Tucson, Arizona

Posted 17 January 2013 - 12:05 AM

I'm just starting to implement this extension in a project. Thanks to Chirvo and Yuga for all the great work.

For some reason I wasn't able to get the db migration to work using yiic. In case anyone else had the same problem as I did, or anyone is trying this without access to a terminal session on the server (thus no yiic), here is a SQL dump of the tables that have to be created:

CREATE TABLE `sm_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `query` text,
  `email_field` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) TYPE=InnoDB;

CREATE TABLE `sm_queue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `to` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `headers` text NOT NULL,
  `status` int(11) NOT NULL,
  `create_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `to` (`to`),
  KEY `subject` (`subject`),
  KEY `status` (`status`)
) TYPE=InnoDB;

CREATE TABLE `sm_template` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  `from` varchar(255) DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `body` text,
  `alternative_body` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) TYPE=InnoDB ;


(You don't have to use the InnoDB engine if you don't want to. I make it my default in order to take advantage of foreign key relationships.)
0

#36 User is offline   chirvo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 72
  • Joined: 30-November 10
  • Location:Venezuela

Posted 04 March 2013 - 11:42 AM

Thank you SteveD for the MySQL schema. I'm gonna add it to the documentation.
0

#37 User is offline   mirrorps 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 25-June 09

Posted 02 September 2013 - 04:20 AM

Hi Chirvo,

Congrats for the great module! I was planning to create the same module for a long time now (what a relieve).

I just wanted to let you know that I had to use it outside from another module (admin module) and in order to make it work I had to customize it a little bit:

/* 
 * --- SimpleMailer.components.SimpleMailer ----
 * add init method with empty body
 */

public function init(){ }

...

/* 
 * --- SimpleMailer.SimpleMailerModule ----
 * add the following row to the init method
 */

$this->setComponent('SimpleMailer', array('class' => 'SimpleMailer'));

....

/* 
 * Call it from an external module's controller
 */

Yii::app()->getModule('SimpleMailer')->getComponent('SimpleMailer')->send('johndoe@example.com', 'template_name', $template_vars);

ToolsFactor.com
e-commerce website built with Yii
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users