how can one override default registration email in a hook form alter registration? - drupal

The main site sends a registration email and I do not want that email to be sent to this new registration as it should have its own custom email. I am having a hard time with this because every time a user registers either on main registration or this custom registration, they get the same mail. How can i keep my custom registration mail separate?

In the administrative interface, you can disable the feature to send email when a user registers. Then, you can just use drupal_mail() and hook_mail() to send your own custom email after the user has registered.
To do that, you will need to use hook_form_alter(), and alter the registration form to redirect to a custom menu callback. After you do that, you can send any email (or do anything else) you want.

Simple way: http://drupal.org/project/advanced_mail_reroute

Related

Custom Firebase Email Verification Template and Action Handler

I would like to customize the email template (using the Trigger Email extension templates) to send verification links to users.
I understand it is not possible to change the template from the Firebase console as it prevents spam.
I am aware of the ability to customize action email handlers (The page that the user lands on when the link in verification email is clicked), as well as the ability to update the auth user's emailVerified property manually.
Is there also a way to generate the verification link that firebase would have used? One with the following properties:
mode
oobCode
apiKey
continueUrl
lang
My ideal solution is to send a custom template to the user upon registration with the generated verification link. Direct users to a custom handler page, and use the applyActionCode() function as shown in The Docs to verify the email (I hope this implicitly updates the emailVerified property on the Auth.User record.)
I have achieved this by creating the user and generating the link on the backend with the admin SDK.
So your frontend would call a callable function or bespoke API endpoint for instance for the registration instead of using the SDK directly.
The callable would go about this:
Creating the user in Auth: auth.createUser()
Creating the user in your DB (Firestore, Mongo etc.)
Assigning custom claims if required: auth.setCustomUserClaims
Building the link for signin: auth.generateSignInWithEmailLink()
Sending the email to an email transactional API
You will need an ESP e.g Sendgrid, MailChimp, MailGun etc. for the last step. There you will have all the freedom to build your own templates.
Please note that the generateSignInWithEmailLink will take care of verifying an email address and signing-in. It could therefore be used for login and registration.
Cheers

Creating WordPress account based on email only submit

Is it possible to create a WordPress account for users who submit an email (no password or username) through an email collection form?
I am looking at sending the user a link to their email to set a password and setup the account in full. The use case is content locking to signed up/logged in users without requiring them to go through the full sign up process. Thanks
I would recommend one of two options: 1) search wordpress.org for a frontend user registration form that may allow you to customize the password options or 2) simply use a generic form or subscription plugin to collect user info, create the new user on the backend manually and then send them an email with a link to change their password

How to add a custom email verification for firebase?

I want to change the default email verification and password reset to my custom email without having to change the link in which the user has to go to. I added the domain I want to and did the necessary changes to the domain. Waited 48 hours to verify, the response was that it cannot be verified. I would like to have more details on how to add a custom email.

I want new user should verify his email before login

I am using wp-members plugin for user registration and login. But I have to send a verification link in mail when user registers. How can I do that?
you can also use theme my login so you can easily achiv this.
Require users to be approved or confirm e-mail address upon registration
one of this plugin options

Validate the Authenticity of a User For Site Subscriptions

I have a web application that creates user accounts, but I would also like to have the ability to have users that can sign up for subscriptions without accounts. All they have is a subscription page to modify email settings and enable the newsletter subscription.
My questions is how do I verify that the user is who they say they are without a username/password, and my second is how should they access this page. I dont want just anyone typing in the url with the email and access subscription settings for that user.
For each user entry you create a unique access code that you use in the url in order to validate that this is the user you want.
The subscription form will give these options:
subscribe by filling in your email
request to change your settings by just putting your email to another field
both action will send an email to you with a special url
the first to validate that this is made by you so you will enable this user & his email
the second to send him another special url to make any changes to his settings in the case that this use is active in your database.
For this unique code you can use md5 of his email with a timestamp when he was registered.

Resources