ghostkissboy / yii-mail Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/yii-mail
Automatically exported from code.google.com/p/yii-mail
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
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:
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
CEmailLogRoute uses mail() to send messages.
I've created the attached class that solves this, but... I couldn't find how to
easily add headers to the message.
Maybe it could be a nice extension to this extension (lol).
Original issue reported on code.google.com by [email protected]
on 24 May 2012 at 9:16
Attachments:
Message is a very generic class name. This would be better refactored to
MailMessage - the extension is brilliant but I have to write my database and
app code knowing that Message is now out-of-bounds.
Original issue reported on code.google.com by [email protected]
on 13 Aug 2010 at 6:46
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
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
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
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
When I try to render a view that is not found, I get "require error", but it
may be better to throw an Exception.
This can be fixed in function YiiMailMessage::setBody()
Original issue reported on code.google.com by [email protected]
on 4 Sep 2012 at 10:39
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
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
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
YiiMailMessage incorrectly calls the parent::__construct(), effectively wiping
out any variable data passed to __construct().
Patch attached.
Original issue reported on code.google.com by intel352
on 16 Dec 2010 at 5:58
Attachments:
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
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
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
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
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
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.