Giter VIP home page Giter VIP logo

yii-mail's Issues

Sending emails in CConsoleApplication results in PHP error

With strict errors turned on I had to tweak the code in YiiMailMessage.php

At line 134 I have changed the code to:

// if Yii::app()->controller doesn't exist create a dummy 
            // controller to render the view (needed in the console app)
            if(isset(Yii::app()->controller))
            {
                $controller = Yii::app()->controller;
            } else
            {
                $controller = new CController('YiiMail');
            }


Original issue reported on code.google.com by [email protected] on 23 Nov 2010 at 11:34

Theme support

What steps will reproduce the problem?
1. Create and activate theme "my_theme" (folder & config)
2. Create email template in /themes/my_theme/views/emails/my_email_template.php
3. In main config set 'viewPath' => 'application.views.emails',
4. Set $message->view = 'my_email_template';
5. Send mail

What is the expected output? What do you see instead?
The expected output would be an email that utilizes the template from the 
theme. Instead I get the Exception 
"require(/protected/views/emails/my_email_template.php): failed to open stream: 
No such file or directory" It clearly states that the template is not found 
because it is not searched for in the theme directory.

What version of the product are you using? On what operating system?
Yii 1.1.8, yii-mail_r9

Please provide any additional information below.
If necessary I will provide further information.

Original issue reported on code.google.com by [email protected] on 23 Nov 2011 at 2:16

Use prefixes

I do have Message model in my app so can't use this extension without modifying 
a lot of my own code. Using prefixes will solve this issue.

Original issue reported on code.google.com by alexander.makarow on 24 Jun 2010 at 12:28

attach function

What steps will reproduce the problem?
1. in a controller function to send a mail
2. when attaching a file that comes from 
CUploadedFile::getInstanceByName('fileupload')
3. and put the code in the 
$message->attach(Swift_Attachment::fromPath($uploadedFileName->tempName);


What is the expected output? What do you see instead?
Instead of working, it shows an error because it does not recognise the 
Swift_Attachment out of the "YiiMail" 

What version of the product are you using? On what operating system?
the last version on linux

Please provide any additional information below.
I found the code in this link:
http://stackoverflow.com/questions/7941398/yiimail-sending-attachment/7946416#79
46416

Original issue reported on code.google.com by [email protected] on 15 Dec 2011 at 6:03

Argument 1 passed to Swift_Mailer::send() must implement interface Swift_Mime_Message, instance of YiiMailMessage given,

I have "all" PHP warnings/errors active (in the PHP.INI)


I get the following error:

PHP Error[4096]: Argument 1 passed to Swift_Mailer::send() must implement 
interface Swift_Mime_Message, instance of YiiMailMessage given, called in 
D:\workspace\project\protected\extensions\yii-mail\YiiMail.php on line 181 and 
defined
    in file D:\workspace\project\protected\extensions\yii-mail\vendors\swiftMailer\classes\Swift\Mailer.php at line 68


#0 D:\workspace\project\protected\extensions\yii-mail\YiiMail.php(181): 
Swift_Mailer->send()
#1 D:\workspace\project\protected\commands\CheckAlertsCommand.php(181): 
YiiMail->sendSimple()
#2 D:\workspace\project\protected\commands\CheckAlertsCommand.php(159): 
CheckAlertsCommand->notifyAlert()
#3 D:\workspace\project\protected\commands\CheckAlertsCommand.php(119): 
CheckAlertsCommand->checkMouvementAlert()
#4 D:\workspace\project\protected\commands\CheckAlertsCommand.php(16): 
CheckAlertsCommand->checkPositions()
#5 D:\workspace\yii\framework\console\CConsoleCommandRunner.php(65): 
CheckAlertsCommand->run()
#6 D:\workspace\yii\framework\console\CConsoleApplication.php(91): 
CConsoleCommandRunner->run()
#7 D:\workspace\yii\framework\base\CApplication.php(162): 
CConsoleApplication->processRequest()
#8 D:\workspace\yii\framework\yiic.php(33): CConsoleApplication->run()
#9 D:\workspace\project\protected\yiic.php(7): require_once()

This happens with a 'sendSimple' as well as the advanced example.

Original issue reported on code.google.com by [email protected] on 10 May 2012 at 11:55

Error in sendSimple() method

wrong: else return $this->getMailer()->send($message);

right: else return $this->getMailer()->send($message->message);

Original issue reported on code.google.com by [email protected] on 19 Aug 2014 at 2:38

Enh: Update to SwiftMailer v. 4.0.6

Why don't you update SwiftMailer version to the last stable?

Original issue reported on code.google.com by robregonm on 13 Sep 2010 at 10:18

Use views from the current controller...

If keep things structured it be nice if the view would look for the controller 
path instead only views/mail/message

views/controller/mail/message

or just

views/controller/mail_message

Would keep things a little better organized ;)

Original issue reported on code.google.com by [email protected] on 17 Jun 2010 at 4:33

sendSimple

file YiiMail.php line 181

You should change it from
  else return $this->getMailer()->send($message);
to 
  else return $this->getMailer()->send($message->message);

Original issue reported on code.google.com by [email protected] on 21 Mar 2011 at 8:09

Some small error in Mail.php

Line 207:
$this->transport = Swift_SmtpTransport::newInstance();

Remove new.. as this function is called statically


line 236 / 239:
require 
YiiBase::getPathOfAlias('application').'/vendors/swiftMailer/classes/Swift.php';
Yii::registerAutoloader(array('Swift','autoload'));
require 
YiiBase::getPathOfAlias('application').'/vendors/swiftMailer/swift_init.php';

These files should not come from current component directory but the vendor 
directory ;)

Also Message could cause conflicts with autloading as it is a very general 
class name.. Refactor to MailMessage would be nicer i think.

Original issue reported on code.google.com by [email protected] on 17 Jun 2010 at 4:32

foreach for empty transportOptions

In case of smtp transport and empty transportOptions it will cause an php error 
Invalid argument supplied for foreach() in line 
    00212:                     foreach ($this->transportOptions as $option => $value)


I think you should add if ($this->transportOptions !== null) before it.


Original issue reported on code.google.com by [email protected] on 17 Jan 2011 at 1:20

google code migration issue...

it's urgent to migrate to github ou other git system.

http://google-opensource.blogspot.fr/2015/03/farewell-to-google-code.html

March 12, 2015 - New project creation disabled.

August 24, 2015 - The site goes read-only. You can still checkout/view project 
source, issues, and wikis.

January 25, 2016 - The project hosting service is closed. You will be able to 
download a tarball of project source, issues, and wikis. These tarballs will be 
available throughout the rest of 2016.

Original issue reported on code.google.com by mcarbonneaux on 13 Jun 2015 at 7:26

Outdated swiftMails libs - Does not support certain TLS SMTP - After upgraded libs to Swiftmailer 4.1.5 it works fine

What steps will reproduce the problem?
1. Set-up a TLS SMTP connection against e.g. some Exchange servers
2. Attempt to send mail

What is the expected output?
A sent mail

What do you see instead?
fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

What version of the product are you using? On what operating system?
yii-mail_r9.zip

Please provide any additional information below.
After upgraded libs to Swiftmailer 4.1.5 it works fine (4.0.6 was bundled)

Original issue reported on code.google.com by [email protected] on 9 Feb 2012 at 2:26

Add email override option for development/testing

Currently there is no way to add a setting that will send ALL emails sent with 
yii-mail to a single email address.

The use case for this is for testing or development of an application. You want 
all emails to end up at a certain account, and not at the admin's account, or 
someone else's email address when you are testing.

Attached is a patch that adds this functionality by adding a new overrideEmail 
parameter to YiiMail.php

Original issue reported on code.google.com by [email protected] on 7 Jul 2011 at 12:07

Attachments:

Sendmail support

Swiftmailer supports Sendmail, so, It would be good to have it in yii-mail.
I can give you a hand maintaining this extension if you want.

Original issue reported on code.google.com by robregonm on 16 Sep 2010 at 1:40

Views doesn't support localizedViews

What is the expected output? What do you see instead?

I have different view files 'views/mail/en/mail.php' and 
'views/mail/ru/mail.php'

Your extension doesn't use Yii's findLocalizedFile function, to get right view.

Original issue reported on code.google.com by [email protected] on 17 Mar 2011 at 4:33

Issue with PHP 5.3+?

What steps will reproduce the problem?
1. Create a message using example code:
$message=new YiiMailMessage;
$message->view='myView';
$message->setBody(array('model'=>$_model), 'text/html');
$message->subject='my subject'; // <- this line will cause an exception to be 
thrown
$message->addTo($_model->username);
$message->from='[email protected]';

What is the expected output? What do you see instead?
Expected output: no exception

What version of the product are you using? On what operating system?
r9, Windows 7, IIS7, PHP v5.3.10

Please provide any additional information below.
I think it has something to do with the magic setter method but don't know 
enough about those, or what changed between 5.2.x and 5.3.x in these magic 
methods to diagnose further.

Original issue reported on code.google.com by [email protected] on 17 Apr 2012 at 9:04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.