-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Mailer] Add feature mailer:send-email #14725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small changes, thank you for working on this feature!
@@ -190,6 +190,26 @@ party provider: | |||
|
|||
Note that the protocol is *always* HTTPs and cannot be changed. | |||
|
|||
Checking your configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking your configuration | |
Checking your Configuration |
Checking your configuration | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
If you have any doubt on your configuration. Or if want to make sure your mail supplier is still working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have any doubt on your configuration. Or if want to make sure your mail supplier is still working. | |
If you have any doubt on your configuration or if want to make sure your mail supplier is working properly, |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
If you have any doubt on your configuration. Or if want to make sure your mail supplier is still working. | ||
You can do this with the ``mailer:send-email`` command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do this with the ``mailer:send-email`` command: | |
you can do this by using the ``mailer:send-email`` command: |
.. code-block:: terminal | ||
|
||
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com --body-source=file --body=/path/to/file | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. versionadded:: 5.3 | |
The ``mailer:send-email`` command was introduced in Symfony 5.3. |
.. code-block:: terminal | ||
|
||
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com --subject=Test --body=body | ||
|
||
# No subject/body to send simple test mail | ||
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com | ||
|
||
The command can also send body from file using ``--body-source`` option: | ||
|
||
.. code-block:: terminal | ||
|
||
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com --body-source=file --body=/path/to/file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. code-block:: terminal | |
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com --subject=Test --body=body | |
# No subject/body to send simple test mail | |
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com | |
The command can also send body from file using ``--body-source`` option: | |
.. code-block:: terminal | |
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com --body-source=file --body=/path/to/file | |
.. code-block:: terminal | |
// no subject or body needed to send a simple test mail | |
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com | |
// use a custom body and/or subject | |
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com --subject=Test --body=body | |
// use a file for the body | |
$ php bin/console mailer:send-email from=a@symfony.com to=b@symfony.com --body-source=file --body=/path/to/file |
The code PR was closed, feel free to reopen. Thanks |
Linked to symfony/symfony#39173
http://127.0.0.1:8080/mailer.html