#Sending emails

1 messages · Page 1 of 1 (latest)

storm raptor
#

Hi! How would I create credential for the SMTP server? Google no longer allows me to create app passwords

upbeat elk
rose jewel
#

@storm raptor Yes you still can use App Passwords, you just need to activate 2-Step Verification and the option will be under that section (at the bottom)

storm raptor
# rose jewel

Hey sorry for late response, I just saw your message

#

Thank you for the info! I will try to see if it works asap

storm raptor
#
class ExpenseMail extends Mailable
{
    use Queueable, SerializesModels;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Get the message envelope.
     *
     * @return \Illuminate\Mail\Mailables\Envelope
     */
    public function envelope()
    {
        return new Envelope(
            from: new Address('[email protected]','name name'),
            subject: 'Expense Mail',
        );
    }

    /**
     * Get the message content definition.
     *
     * @return \Illuminate\Mail\Mailables\Content
     */
    public function content()
    {
        return new Content(
            markdown: 'mail.expense',
        );
    }

    /**
     * Get the attachments for the message.
     *
     * @return array
     */
    public function attachments()
    {
        return [];
    }
}```
#
MAIL_MAILER=sendmail
MAIL_HOST=smtp.google.com
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=app_password
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"```
#

This one just keeps loading, and loading, endlessly

upbeat elk
# storm raptor I get this error :/

Now try using a proper mail sending service, instead of trying to use a personal Gmail account, which isn’t for programmatically sending emails from web applications.

storm raptor
#

Which one would you reccomend?

upbeat elk
storm raptor
twin falcon
#

Try postmark

#

Free 100 emails per month without credit card

long idol
#

It’s not worth trying to get a “free” service, most of the decent mail services have a free tier, you have to put your credit card in, but it won’t be charged until you reach the paid limit. Really I think the cheapest and best option is Amazon SES, from memory it is like 10cents for 1000 emails.

storm raptor
long idol
#

However if you do need one with a free tier, Sendgrid has 100 free emails per day forever.