swiftmailer

blank pdf attachment sent using FPDF and SwiftMailer

99封情书 提交于 2019-12-12 01:24:44
问题 I am trying to create a PDF stream using FPDF library and to send the pdf over e-mail using Swift Mailer. Below is my code. The mail is sent successfully and even pdf is also attached but the pdf is blank. It has a size of 1Kb and can be opened as a pdf. My code is : <?php include('./fpdf/fpdf.php'); require_once './lib/swift_required.php'; $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Text(40, 10, "Dummy text"); $data=$pdf->Output('./emails/order.pdf', 'F');

Blank pdf attachment while sent using FPDF and SwiftMailer

这一生的挚爱 提交于 2019-12-11 21:57:05
问题 I am trying to create a PDF stream using FPDF library and to send the pdf over e-mail using Swift Mailer. Below is my code. The mail is sent successfully and even pdf is also attached but the pdf is of zero bytes size and so could not be opened. When I download the pdf using $pdf->Output('receipt.pdf', 'D') it is successful and the content of PDF is also present. Can somebody help me to identify whether I am doing something wrong? Or do I need to set some additional fields in the message so

Error after updating symfony/swiftmailer-bundle to 2.2.5

不羁的心 提交于 2019-12-11 19:44:01
问题 After updating symfony/swiftmailer-bundle to v2.2.5 with composer.phar update I get such error: Loading composer repositories with package information Updating dependencies (including require-dev) - Removing symfony/swiftmailer-bundle (v2.2.4) - Installing symfony/swiftmailer-bundle (v2.2.5) Loading from cache Writing lock file Generating autoload files [Symfony\Component\DependencyInjection\Exception\InvalidArgumentException] The service definition "swiftmailer.mailer" does not exist. Script

How to Fix Laravel Email Issue

纵然是瞬间 提交于 2019-12-11 17:35:30
问题 I'm implementing Laravel 5.8 built-in Email Verification feature but unfortunately I couldn't figure the bug. I've added the MustVerifyEmail interface in ,y User Model. This is my .ENV file in Laravel. Same configuration I used in mail.php . .env MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=465 MAIL_USERNAME="<My user Name>" MAIL_PASSWORD="<My Password>" MAIL_ENCRYPTION=ssl 回答1: You have to enable access to less secure apps in your google account security settings. 回答2: For configuring

405 error with Ajax POST / Nginx configuration

泄露秘密 提交于 2019-12-11 16:39:31
问题 I'm trying to send email with an Ajax form and swiftmailer. It works in local but not in production. When contact_me.php takes parameters not from form but written explicitly the email is sent even from the server so I think Swiftmailer is working. contact_me.js // Contact Form Scripts $(function() { $("#contactForm input,#contactForm textarea").jqBootstrapValidation({ preventSubmit: true, submitError: function($form, event, errors) { // additional error messages or events }, submitSuccess:

Send ics calendar invite using Swift Mailer and Send Grid

徘徊边缘 提交于 2019-12-11 11:45:30
问题 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 Corporation/

Symfony2 SwiftMailer sendmail transport error

耗尽温柔 提交于 2019-12-11 08:57:32
问题 I wish implementer a contact form on my website. i followed the symfony2 documentation : http://symfony.com/fr/doc/current/cookbook/email/email.html i use symfony 2.3.3. So that is my config_dev.yml: swiftmailer: transport: sendmail My contactAction controller: public function contactAction(Request $request) { $this->focus = "contact"; $form = $this->createFormBuilder() ->add('Sujet:', 'text') ->add('Service:', 'choice', array( 'choices' => array( 'all' => 'Communication multi-canaux

Laravel - Failed to authenticate on SMTP server with .. using 2 possible authenticators

↘锁芯ラ 提交于 2019-12-11 07:31:10
问题 I saw this questions were asked many times. I tried many of them and nothing working. I am using laravel and mailgun api to send email. I am geting this error Failed to authenticate on SMTP server with username "postmaster@noreplay.padelmatch.se" using 2 possible authenticators and also in my dedicated server log I get 2018-05-30 13:37:32 dovecot_login authenticator failed for (domain.com) [198.20.114.174]:40412: 535 Incorrect authentication data (set_id=email@sub.subdomain.com) 2018-05-30 13

Yii2 - Swiftmailer - adding multiple dynamic records per user

元气小坏坏 提交于 2019-12-11 06:33:45
问题 The setup is like this: I have users/clients who book classes. Classes can be multiple classes per date and per location and per instructor. Now there is a need to cancel the bookings for unavoidable reasons for specific location.So I added a table site_closure with location_name , start_date and end_date , and in the controller update the order_item status as cancelled against all the bookings for the dates posted in site_closure Next step is I need to send the mail to user/client detailing

stream_set_blocking() expects parameter 1 to be resource, null given

不羁的心 提交于 2019-12-11 06:17:20
问题 I want to sent emails from online server with Laravel 5.4. I don't know if the problem is with my code or the server. I have hosting from easyname.com. This is my .env file MAIL_DRIVER=smtp MAIL_HOST=smtp.easyname.com MAIL_PORT=465 MAIL_USERNAME=info@mydomain.com MAIL_PASSWORD=mypasword MAIL_ENCRYPTION= This is my config/mail.php file <?php return [ /* |-------------------------------------------------------------------------- | Mail Driver |---------------------------------------------------