上QQ阅读APP看书,第一时间看更新
Sending a verification Email
The purpose of verifying the email address is to avoid spam and invalid email addresses. The following code shows how we can send a verification email address using the sendEmailVerification method:
FirebaseAuth auth = FirebaseAuth.getInstance();
FirebaseUser user = auth.getCurrentUser();
user.sendEmailVerification()
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
Log.d(TAG, "Email sent.");
}
}
});
We can customize the email templates as well; to customize the email templates you can visit Firebase help center. Also, we can change the language of the mail.