FAQ Database Discussion Community


Sending Email in Laravel Using Swift Mailer without Gmail

laravel-4,swiftmailer
Hello i'm new to laravel and still getting familiar with certain features, i would like to know how i can send an email from my laravel application without using gmail smtp settings. Like the way the mail function works in basic PHP. Is this possible? I have tried googling it...

Email break line doesn't work

php,symfony2,swiftmailer
When I'm trying to send an email with type text/html that contains break lines <br/>, I get an email with break lines that are not parsed like the following: Hello Mr.Test,<br/> Welcome to test world<br/>Regard,<br/>x I also tried to use nl2br without luck....

How to debug (seemingly) faulty SwiftMailer attachments?

php,email,debugging,swiftmailer
I'm having a bit of a problem with trying to figure out what and where exactly goes wrong in my app. What I'm trying to do is upload a file through form <input type="file"> field. Then the file is being base64 encoded and attached to the mail. Symptoms: The attached...

Send ics calendar invite using Swift Mailer and Send Grid

php,icalendar,swiftmailer,sendgrid
I'm trying to send a calendar invite to Gmail using sendgrid and swiftmailer. This is my entire code: <html> <head> <title>PHP Test</title> </head> <body> <?php require_once('path/to/lib/swift_required.php'); require('path/to/smtpapi-php.php'); $transport = \Swift_SmtpTransport::newInstance('smtp.sendgrid.net', 587); $transport->setUsername('uname'); $transport->setPassword('pass'); $mailer = \Swift_Mailer::newInstance($transport); $ical="BEGIN:VCALENDAR\r\n PRODID:-//Microsoft...

Can't send html email with laravel + mandrill

php,laravel,swiftmailer,mandrill
I am using Laravel 4.2 and mandrill plugin. This way I can send emails using the laravel syntax (swiftmailer) and the mails are sent by mandrill. However, I can't seem to send HTML messages. They appear as text emails with htmltags inside. What could be wrong? //Send email $emailName =...

Sending basic mail with Laravel

php,laravel,swiftmailer
I am trying to set up my mailer with the Laravel framework. I set up a very basic example to send a test mail, just to verify all is working as it should. Although, I am unable to get it to work, it is generating the error shown below. Note,...

Laravel put foreach inside mail

php,laravel,laravel-5,sendmail,swiftmailer
i want use a foreach inside my mail function, but i'm not sure how to do that, (i'm using swiftmailer, but that's not really relevant i think) here is my code: Mail::send('emails.bestelling', array( 'mededeling' => $bestelcode, 'rekeningnummer' => '000/000000/00', 'naam' => $userNaam, 'totaal' => $totaal, 'producten' => foreach ($mand as...

Cannot Access Attach Method using SwiftMailer in Symfony 1.4

php,symfony2,symfony-1.4,swiftmailer
I'm trying to attach a file using SwiftMailer, but when I call the ->attach() method I get: method attach not found in swift_mime_message Currently, the message sends, but it has no attachment. Controller code below: $transport = Swift_MailTransport::newInstance('smtp.gmail.com', 587, 'ssl') ->setUsername('[email protected]') ->setPassword('Work_Pls') ; // Create the Mailer using your created...

Symfony\Component\Config\Exception\FileLoaderLoadException] error

php,symfony2,twig,swiftmailer
Hi I stumble upon this error everytime I want to run my Symfony application from console. Therefore I am unable to use this symphony app at all. Please help me with your knowledge. [Symfony\Component\Config\Exception\FileLoaderLoadException] Unable to parse at line 9 (near "mailer_transport="gmail"") in /opt/lampp/htdocs/symblog.dev/app/config/parameters.yml (which is being imported from "/opt/lampp/htdocs/symblog.dev/app/config/config.yml")....

Send email with embedding binary image in php

php,image,symfony2,binary,swiftmailer
I'm trying to send email with images, but only have the binary code in my server. Any idea how to do it? Now I'm sending the html like this (in base 64 encoded): <img src="data:image/png; base64, iVBORw0KGgoAAAANSUhEUgAAANIAAANBCAYAAAC ..." /> I'm using the SwiftMailer library from Symfony2 to send the emails....

Attachment with file_get_contents?

email,laravel,laravel-4,attachment,swiftmailer
I spent quite some time trying to figure out any cases with sending email using Lavarel 4 and including attachment to a message. Nobody even talking about it, everybody is attaching file from filesystem. Did anybody have experience sending an email attaching an image (like this: http://www.w3schools.com/html/html5.gif) without actually downloading...

Slim - Swift Mailer on the route is work but if after moved on controller get errors

php,swiftmailer,slim,mailer,slimframework
I add libraries slimcontroller and swift mailer in my slim project, when in route goes well: Route::get('/send', function() use ($app, $mailer) { $message = Swift_Message::newInstance('Activation Code') ->setFrom(array('[email protected]' => 'xxx')) ->setTo(array('[email protected]' => 'xxxs')) ->setBody('Test'); // Send the message $results = $mailer->send($message); // Print the results, 1 = message sent! print($results); });...

I cannot send mail with SwiftMailer or PHPMailer from Localhost using gmail

email,gmail,localhost,phpmailer,swiftmailer
I have recently been unable to send out mails through php on localhost. I use PHPMailer and SwiftMailer in different parts of the application. With SwiftMailer I get this: Connection could not be established with host smtp.gmail.com [ #0] With PHPMailer, the message is: SMTP Error: Could not connect to...

Asterisks instead of SMTP codes in response from Microsoft Exchange server

email,smtp,exchange-server,swiftmailer
I'm working on a Laravel 4.2 application that needs to be able to send emails. When the SwiftMailer component contacts the Microsoft Exchange server we use here it's receiving the following reply: * OK The Microsoft Exchange IMAP4 service is ready. * BYE Connection is closed. 13 My understanding is...

Init application component with config from database

php,initialization,yii2,swiftmailer
I'm building a Yii2 application that sends email through the swiftmailer extension. I store the email settings (smtp, ssl, username, etc..) in a database table, to be able to edit them with an apposite view. How can I init swiftmailer with config from the db table? Thank you....

Can not change to another view controller with multiple segue. How can i resolve it?

ios,iphone,uitableview,swift,swiftmailer
I'm using multiple segue in swift and I have an UIAlertView in a tableView. The UIAlertView shows perfectly. When I click to the first Option (Ver Mapa), it changes perfectly to another viewController(Mapa) with segue(go_to_mapa). But when I press the second Option (Ver detalle) with segue (go_to_detalle) to change to...

Yii 2: Unable to send log via mail

php,email,yii2,swiftmailer
This is my mailer component. As you can see, because of my test purposes, I'm using email on file 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', 'viewPath' => '@common/mail', 'useFileTransport' => true, ], This is my log component. 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [...

Laravel RFC email compliance when using BCC fields

php,email,laravel-4,swiftmailer
I know this is common, but cannot see any clear answers. Here is the code: $message->to('[email protected]', 'All Users') ->bcc('[email protected],[email protected]', 'name,name2') ->subject(Input::get('emailsubject')); This throws this error: Address in mailbox given [[email protected],[email protected]] does not comply with RFC 2822, 3.6.2. If i simply use one email it works fine, how should I be...

Using SwiftMailer in PHP with prebuilt email template changing values

php,email,templates,twig,swiftmailer
I have used SwiftMailer a number of times for basic email sending, however I am trying to get the grips on sending more streamlined emails - so as to allow quicker creation of emails using templates. I know I can manually create a template using the Decorator Plugin but this...

Yii2 How to handle Swift_TransportException exception?

exception-handling,yii2,swiftmailer,yii2-advanced-app
When trying to send mail using swiftmailer I am getting the following error: Expected response code 250 but got code "550", with message "550 User [email protected] has exceeded its 24-hour sending limit. Messages to 250 recipients out of 250 allowed have been sent. Relay quota will reset in 1.47 hours....

fgets() halting without error in Swiftmailer

php,laravel-4,fgets,swiftmailer
I'm attempting to generate a test email in Laravel 4.2 (Windows 7, IIS 6.1), and I've encountered a silent termination - it just fails, doesn't return my view, and doesn't return an error or Exception. I've managed to brute force my way through the Laravel codebase and located the termination...

How to Configure Laravel 5 default Forget Password( Swift_Mailer) for a Google Mails Account?

laravel-5,swiftmailer
I want to use the Laravel 5 default Swift_Mailer for "Forget Password". I tried to edit .env file providing the following details, but it is still not working: MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=xxxxxx MAIL_PASSWORD=xxxxxx Do I need to modify any other details or files?...

Is it acceptable to fork a PHP script to continue email processing and to return data to the user?

php,cron,swiftmailer
I'm adding email functionality to an existing website and I am trying to integrate it in a way that requires the least user wait time. My latest plan is to fork a user's request when the application gets to sending the actual email so I can return a page the...

Symfony2, Sonata, UserBundle : Send email when user is enable on update

symfony2,swiftmailer,sonata-user-bundle,sonata
I would like to be able to send an email to the user when the admin enable the user in Sonata admin panel. I have to idea which file i should override or extend. I suppose it is similar to this subject or this stack-overflow subject: /** * {@inheritdoc} */...

Detecting a mail was sent using swift mailer in current scope

php,symfony2,swiftmailer
I'm building functional tests for a Symfony2 app and need to know when an email was sent but not from an api request. (This link is not what i'm looking for: http://symfony.com/doc/current/cookbook/email/testing.html) The flow of the application is the following: User create a personalized video A flattening request (to create...

Swift Mailer ruins autolading

php,autoload,swiftmailer,autoloader
I'm writing simple PHP application which is using Swift Mailer library. My app doesn't use namespaces nor composer. However, after requiring swift_required.php my (model) classes are not found (Fatal error: Class 'Format' not found is thrown by PHP interpret). Autolading define("_DOCUMENT_ROOT", str_replace("//", "/", $_SERVER['DOCUMENT_ROOT'] . "/")); function __autoload($class_name) { $file_name...