kaisellgren / mailer

Compose and send emails from Dart. Supports file attachments, HTML emails and multiple transport methods.
MIT License
166 stars 86 forks source link

warranty securtity identify and password #237

Closed xds74 closed 1 year ago

xds74 commented 1 year ago

Hello, in the code it is written not to enter the identifiers and password in clear. String username = 'username@gmail.com'; String password = 'password'; My host does not allow to associate a token with the mailbox

What possibility to enter the password final smtpServer = SmtpServer('my_host.com', port: 465, username: 'my_identify@my_host.com', password: "My_password", #here how to do

Thank you for your return, to go reduce the privileges of the account and put a password different from the rest of the code I do not see what else to do for the moment.

close2 commented 1 year ago

This library isn't suitable for flutter.

A token could also easily be extracted from the application and SPAM could be sent in your name. (If you used you gmail, somebody could also read all emails, as the password is the same for reading and sending mails.)

If you want to send yourself information, you'll need a service, which restricts the recipient address to your mail-address. If you want to send mails to arbitrary addresses (for instance invitations...) you'll need a service which restricts the content of the mail. AFAIK supabase or firebase can be help you in both cases.

If you want the app-user to send arbitrary content to arbitrary destinations, you'll need to ask the user for an smtp-server.