Send email to the user - ionic4

I need, when the user click one button, that send email with more information from the report
Im tried to use emailComposer but i dont want it.
let email = {
to: 'max#mustermann.de',
cc: 'erika#mustermann.de',
bcc: ['john#doe.com', 'jane#doe.com'],
attachments: [
'file://img/logo.png',
'res://icon.png',
'base64:icon.png//iVBORw0KGgoAAAANSUhEUg...',
'file://README.pdf'
],
subject: 'Cordova Icons',
body: 'How are you? Nice greetings from Leipzig',
isHtml: true
}
// Send a text message using default options
this.emailComposer.open(email);
That plugin open the email app, i just want to send email automatically.
Thanks!

You cannot just send an email using the device's users email account.
If you want to do this then you must use a third-party email sending service that has an API.
MailGun is pretty good and gives 10,000 free emails a month and then only 5USD for the next 10k.
There are a lot of different services out there though, just search for "transactional email provider" and you will find these types of companies.

Related

Email goes into spam using Graph API

We are using Microsoft Graph API for sending email. Unfortunately, some emails goes to spam at the recipients side.
Please find the sample email as below:
Subject: Test email
Email body:
sample email
Note: The button shown in the email body contains the link "https://zijpendaal.acc.notarisbox.nl/"
Could you please help us with this?

Amplify custom email on change password

Where are located the email message on AWS, it is in Cognito?
When a user ask to change his email, it calls this function:
Auth.forgotPassword()
But I can't find where to change the email message (the body, the content).
Currently is a custom message that the previous developer did but I can't find where is it
You can customise email verification messages under the Message Templates heading in the Messaging tab of your user pool.(For small changes)
Need fully customise use the following link
https://bobbyhadz.com/blog/aws-cognito-customize-emails
You cant change your email address if the email address is your credential. if you use a username as a credential then you can update the email.

AWS SES bounced/complain email handle

We have some issues related with AWS SES bounce and complain emails,
and we send send emails on these conditions. these conditions are as follows:
1) When new user registered, 2) When user forget his/her password and 3) When he/she purchased any video from ourplatform. To send email we have implemented AWS SES mail service and successfully managed to send email from AWS SES. But here I have some doubt to handle Bounced and Complaint email. According to this post on stackoverflow:
Handle hard bounces / complaints or just stick to suppression list?
We have managed list of emails in our database, when new user 1st time registered into our platform and getting notification for bounced and complaint notifications from AWS SNS. But here are some case I want to discuss with you:
Bounce: When user 1st time registered into our platform and his/her email does not exist i.e. jm123#gmail.com in that case we save his/her email into our bounced email list, but when 2nd time he creates a email with the same email id ( jim123#gmail.com ) and want to register with our platform again then how we will remove that email from list because we have already black listed that email in our platform.
Complaint: In 2nd case when user accidentally put our platforms email as spam when we send him/her a email and getting complaint notifications for that email and for complaint emails we have managed list of complaint emails and saved that email in this list so that same user can not get email from the next time but after some time that user white list us from spam and wants our email notifications.
Note: Is this necessary to handle all bounced or complaint email into our database because randomness of emails are infinite and for all random emails we have to handle into our database. and before send emails to any new registered user, 1st we have to process our bounced and complaint emails list then we will decide the user is eligible to receive our email or not.
Sorry for my bad English.
The StackOverflow Question you linked to covers this in the Answer.
Yes, you should maintain your own database table of at least some of the permanent bounced emails, something like:
record ID (auto increment), email address, bounce type: invalid mailbox | user complaint | rejected for content | rejected for spam blacklist
Bounce: "when 2nd time he creates a email with the same email id ...
how we will remove that email from list because we have already black
listed that email in our platform?"
When the user tries to add the email, you query the email address in your table, you see the type is "invalid mailbox", and then reject it as invalid. You could possibly also log the IP address to catch spammers trying to create fake accounts.
Complaint: "... but after some time that user white list us from spam
and wants our email notifications."
When the user tries to add the email, you query the email address in your table, you see the type is "user complaint", and maybe ask them "are you sure?" before adding them back to your mail list. You change the type of the email in your database to something like "user confirmed OK to send"
You could also just add one extra field to your existing mailing list table to hold the bounce type, with the default type being 0 / OK / not bounced. Then when sending email you skip sending emails where the type is not 0 / OK.
But in hard bounced if user will have valid email address after put
his email address in table and he/she wants our subscription then how
we could handle
You could allow them to re-add the address and set the type back to 0, but this might be a fake address like "fake#fakefake.com."
If you want to let them do this you could have a second field "times bounce was cleared" and add +1 each time the address is set back to 0 / OK / mail allowed. If this counter reaches 3-5 you never let them add the email again. They must use a different email.
what about soft bounce
"Transient" (soft) bounces should be ignored. SES will try again later and if it still fails then you will get a hard bounce.

windows app store access to user email

I would like to create a feedback form for users to give feedback for the app. Is there access to the users email address from the app? can the app ask for permissions? If I don't have access how can i hyperlink to the users email client for a windows8 app store app?
If you want to open up the users mail client you can do something like this:
await Windows.System.Launcher.LaunchUriAsync(new Uri("mailto:support#email.co.uk?subject=App Feedback"));
That's what I've used for our support link and it opened up the Mail app with the subject set correctly :o)
You can get the user's email address by getting the principal name - this is documented to be typically the address but you cant be sure so use an email validator to check If its actually the email address. If not prompt the user to enter it for you.
var principalName = await Windows.System.UserProfile.UserInformation.GetPrincipalNameAsync();
The best you can do is ask them for their email address or use the Contact Picker. Like John mentioned you may be able to get a valid email address from the display name but do not rely on this to be true as its not an email address field.

detect that an email is sent to a mailing-list

My application sends mails containing an authentication token. The user which receives the mail clicks on a link and is directed to a webpage. The app recognizes him.
The problem is that sometimes the mail is sent to a mailing list instead of a personal address. Then several people come on the page and override each others' actions.
There are 2 ways I think I could solve this :
detect that the email address is a mailing list before I send the mail
include the final recipient address in the link in the email.
Is any of the 2 possible ?
No.
The recipient can tell if the message came from a mailing list (if the list follows the right guidlines), but the sender can't.
There is no way for the sender to modify the body of an email dynamically based on the final recipient.
David's answer is correct. Though, depending on your context you may find the following idea useful:
You might be able to record the number of clicks per email sent out using that token and just specify a threshold. If the number of times the auth token exceeds it, flag the recipient as a mailing list and exclude them from future mailings.