This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

GrCOTE7
GrCOTE7

Hi, all,

Congrates Leokhoa for this Laragon... Will simplify a lot of things for lot of guys :-) !

I use it to work and learn a frameWork called OctoberCMS (Based on Laravel as well ;-))...

All is perfect, even virtualhosts I succed in good work without .dev... (y) (My local URL is...: http://p ! ! ! ("p" as inital of project ;-) )

I've only have got one trouble...:

When I test email with your own button 'test email': OK When I use mail() in a plugin in my framework OctoberCMS: OK But when I use swiftmailer with this code:

$vars = [
      'name'    => 'Lionel',
      'email'   => 'ddd@com.com',
      'content' => 'Mon message (Issu de la page d\'accueil'
    ];

    dump($vars);

    if (1) // Just for easy active or inactive this part above for tests
       {  
           Mail::send('mypseudo.testingplugin::mail.message', $vars, function ($message) 
           {
                $message->to('MyEmail@gmail.com', 'Lionel');
                $message->subject('Nouveau message depuis mon plugin...');
           });
      }

and of course, the email's template in views/mail/message.htm

<p>You got a message from {{name }} at {{email}}</p>

<hr>

<strong>Message</strong><br>

{{ content }}

Note the error message is:

We're sorry, but an unhandled error occurred. Please see the details below.

C:\laragon\www\wl\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php line 298

EXCEPTION

Swift_TransportException

This exactly same code run very well, even in a virtualbox with a linux based configuration... (The copy is strictly the same with use of a complete private gitlab deposit...)

Do you have an idea what I have to do for this run with Laragon too ?

Thanks

Last updated

GrCOTE7
GrCOTE7

New and last precisions:

    if (1) {
      $transport = Swift_MailTransport::newInstance();
      $mailer    = \Swift_Mailer::newInstance($transport);
      $message   = (new \Swift_Message('Hello Email'))->setFrom('MyRealEmail@gmail.com')
                                                      ->setTo('MyRealEmail@gmail.com')
                                                      ->setBody('Mon message émis depuis le script');
      $mailer->send($message);
    }

This code run well... (I can receive real email , or the notificiation with the Laragon's email interceptor, or the two !)

I think, that perhaps, it's just with the facade Mail, I have trouble...

Note: Same trouble with link 'email lost', and even with a new basic installation of October...

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.