K
K
Kripto772020-02-04 11:04:14
symfony
Kripto77, 2020-02-04 11:04:14

How to send a SwiftMailer email via sendmail in Symfony 4.4 (OpenServer)?

For testing, sending emails to Symfony 4.4 / SwiftMailer via sendmail on OpenServer is very necessary. Tried different settings but doesn't help.

Option 1 (works on hosting)
.env
MAILER_URL=sendmail://localhost

/config/packages/swiftmailer.yaml

swiftmailer:
    url: '%env(MAILER_URL)%'


Gives an error Process could not be started
Screenshot of the error
5e3921dcd5716162822390.png


Option 2
/config/packages/swiftmailer.yaml
swiftmailer:
    default_mailer: default
    mailers:
        default:
            transport: sendmail
            command: 'C:\OSPanel\modules\sendmail\sendmail.exe -t'
            timeout: 20


Calling the page indefinitely, OpenServer does not terminate the script execution by max_execution_time

Thanks in advance

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question