Questions tagged [emails]

Drupal core uses email for a number of important tasks, such as verifying authenticated users' email address.

Filter by
Sorted by
Tagged with
0
votes
1answer
20 views

How to change sender email Id using hook_mail_alter

How to change the sender email id for some emails, using hook_mail_alter. The default SMTP configured email ID is 'test@myfirstdomain.com' The subject gets altered correctly using the hook_mail_alter, ...
0
votes
1answer
24 views

VBO hook_entity_update

I would like to perform the following mass action via VBO: send a mail to author of a node. This mail is configured and sent in a hook_entity_update function. The beginning of the function is the ...
0
votes
0answers
11 views

Using simplenews in conjunction with sendgrid is possible?

I have installed and configured the simplenews and sengrid module. Sendgrid depends on mailsystem. When the module is installed, it configures itself. I've done the test posts that sendgrid provides ...
0
votes
0answers
21 views

Form submissions including HTML in email notifications

I have a website where the core contact form is submitting the form markup along with the content. So for example, this is in the email notifying the site owner of the submission: <div class="...
-3
votes
1answer
32 views

Sending reminder Email if taxonomy term and webform submission term reference match

This is a tricky request and I cant get my head around it completely. A restaurant delivers only to certain districts within town each day (on an irregular schedule). The webpage shows the next 7 days ...
2
votes
3answers
26 views

How can I use one of the pre-set email texts for user registration in a custom module

At /admin/config/people/accounts, there are several stock email messages set. How can I use one of these when I am sending emails from a custom module? The text that's being used in "Welcome (new ...
1
vote
0answers
32 views

How to send send an image inside html email using swiftmailer?

in my Drupal 8 installation I'm using mailsystem module in combination with swiftmailer module. Everything works fine so far, my swiftmailer twig template inside the templates folder of my custom ...
0
votes
0answers
16 views

How to formatting line breaks in custom module's email body containing translatable plain text?

with my custom module I try to prepare an email body containing hard coded plain text. The text should be translatable and formatted with line breaks for a nicer output. The text is prepared in my ...
0
votes
0answers
15 views

Create and use a custom Account Email Template

I am trying to create a new Email Template for the Account object using hook_form_alter. Here is how I create the template: function my_module_form_user_admin_settings_alter(&$form, &$...
1
vote
0answers
24 views

How to make the language of the subscriptions be the currently language in Simplenews

I'm implementing simplenews on a Drupal 8 Website, and I currently came across a problem with the anonymous user subscriptions to the newsletters. According to the documentation of simplenews, when ...
0
votes
3answers
78 views

How can I send an HTML email from an Ajax callback? [closed]

I want to send an email to the user who forget username. I created a functionality that handle with Ajax like send request to controller where I using a query to check whether user exist or not. if ...
0
votes
1answer
30 views

How can I add Commerce Wishlist share mail template variables from form?

I am trying to add 2 additional form fields to the Wishlist Share form where the user input will be rendered in the email. I have been able to add the fields to the form, but I am not sure how to add ...
0
votes
1answer
43 views

How can I render [webform_submission:values] in a table?

I am trying to figure out from where [webform_submission:values] gets rendered. This is how it looks right now in the email submission. Label 1 Value 1 Label 2 Value 2 I want this in a table format. ...
0
votes
0answers
7 views

OG Malinglist rejecting basic email sent to Organic Group

I am using OG Mailinglist 7.x-1.1-alpha2. We have been using this module for years now. We have a new user who is attempting to send emails to a couple of our lists which are the email part of Organic ...
0
votes
2answers
61 views

identify author of an entity

Using Drupal 8 and hooks, I am able to send an email to the current user, thanks to How to send mail programmatically in Drupal 8 and BCC For drupal mail function. So, I define my message in ...
0
votes
1answer
8 views

Altering commerce invoice mails fails

I'm altering different emails from my hook_mail_alter(&$message) function. But for some reason altering the email sent by commerce invoice module is not working. I'm trying to do it like: switch($...
2
votes
1answer
21 views

Limit amount of emails sent per time frame?

Is there a module which allows for the limiting of emails sent per hour using drupal mail system? My server has a limit of how many emails can be sent per hour. Most of my users are online at the same ...
0
votes
0answers
11 views

User Import module's “Send email” option is not reported in system log

When importing batches of users as .csv files, the module's option "send email" appears to be working inconsistently. Some users receive the email, others don't and can't find it in Spam. ...
0
votes
1answer
16 views

Registration email showing default mail message as well new custom message

How to stop default mail , i want to override default mail with my custom body message? Here is my code : function mag_api_mail_alter(&$message) { // only alter register forms if (!empty($...
0
votes
1answer
17 views

How can I send mail containing rendered entity from referenced field?

How do I code a function for sending mail containing a rendered entity that is referenced from a field? I have content type A that contains static information, and content type B that users create and ...
0
votes
1answer
15 views

How to detect order type (recurring or not) in order confirmation and shipping confirmation email templates?

When order is placed an emails is sent to the user generated with template commerce-order-receipt--default.html.twig When order is shipped another email is sent to the user, now generated with ...
1
vote
1answer
48 views

How can I change the date format for user submitted data in confirmation emails

The confirmation emails sent by Webform (running under Drupal 8.9.7) on submission are in US format "m/d/Y" for all date fields that the user entered on the form (but not for system ...
2
votes
2answers
160 views

How do I modify the email maximum length to 320 characters?

I want to overwrite the maximum charcater limit to 320. It is defined in /core/lib/Drupal/Core/Render/Element/Email.php Can anybody tell me how to overwrite it?
1
vote
1answer
24 views

Sending form to mail from custom module fails without error

I've created a module with a form and a block. When I push the subscribe button, the submitForm function is executed. The successmessage is shown, but no e-mail is send ... There are no errors ...
0
votes
0answers
34 views

Send email notifications to Users who have flagged a node

For a site, I 'Events' which have a datetime field for the start time of the event. We also have 'Flags' to allow Users to add specific events to their calendar. Now, we would like to send Users email ...
0
votes
0answers
22 views

Mass Contact shouldn't be applying Glossify filter

I'm working on a Drupal 8 site which is both sending out emails with Mass Contact and uses the Glossify plugin filters in a different part of the site. However when sending emails using an "email&...
1
vote
1answer
239 views

How can I send a HTML email?

I am trying to send an email with HTML content. But Drupal is always scrapping my HTML tags. I see drupal formatting the message in this function: //Class: \Drupal\Core\Mail\MailManager // Format the ...
0
votes
0answers
28 views

Customize email template layout of built-in emails?

How to customize the layout of email templates of built-in emails sent by Drupal: Signup, Password Resetetc.. Currently it's sending plain template. I have tried with hook_mail() hook, but seems that ...
0
votes
2answers
79 views

How do I verify emails on a contact form?

I want to implement a functionality where anonymous users can contact node authors. I have created a contact form with email field for each node. I would like to send an email verification link to the ...
3
votes
0answers
44 views

How can I correctly attach a file to a mail? [duplicate]

I am very new to drupal and need to upload a file and sent it as attachment in Drupal 8. I have created the form element like $form['candidate_attachment'] = [ '#type' => 'managed_file', '#...
0
votes
1answer
26 views

Webform email with list of senders

I am build a webform to send emails. I have some user local accounts. I would like to login with personal user account and send an email, choosing from a list of possible senders. It is possible in ...
2
votes
1answer
540 views

How to send system mails in html format (with Swift Mailer)?

At Account settings page (/admin/config/people/accounts) I can edit system mails Drupal is sending (Welcome, Account activated, Account blocked and so on). I also installed and configured Swift Mailer ...
-1
votes
1answer
48 views

Alter Webform email body

I'm unable to find an example of altering the body of the Webform email confirmation according to the value submitted. I've got in my form a select field, I would like to change the body of the email ...
0
votes
0answers
34 views

Automate notification to Mailchimp

I am trying to automate a notification integration between Drupal8 and Mailchimp. I currently the Mailchimp module installed and a signup form has been configured so that people can signup for ...
1
vote
0answers
49 views

Using swiftmailer, how to check if an email was sent successfully?

For example, when Drupal core contact forms fail to send an email for any reason, swiftmailer throws an exception and logs a message. However, I am trying to hook into the process to display ...
0
votes
1answer
21 views

Testing if email was sent in Kernel test

I am trying to write automated tests for a or that will sent an email on submission. I can write the test to check for the presence of the entity that is created along side the email, but I also want ...
0
votes
0answers
22 views

Formatting labels of Webform2PDF for submissions

How would I go about changing style for all the labels for pdf generated from submissions to a webform. I could explicitly state each [submission:values:email:label] and then provide values with ...
0
votes
0answers
46 views

Entity reference will not render

I'm trying to show a list of entities (messages) in an email. I've got a field "messages" which is a list of entity references. This is using the message stack. I create a new message and set it's ...
0
votes
1answer
124 views

How do I send an email from a module using an Easy Email module email template?

I am creating a form that needs to send an email upon form submission. I want to use the Easy Email module to send HTML emails. I want to send an email from my module, using an Easy Email template. ...
0
votes
1answer
40 views

Sending multiple attachment files by email

I am trying to send multiple files attached to an email, but I can only make it work when only one file is attached. I am using mandrill mailer, btw. Here is the code I have on a form submit: $...
0
votes
0answers
38 views

How to fetch User from Entity Reference in Rules? (to obtain email from a user field)

I'm using an Entity Reference field with select list, target type User (so a user can be selected and saved as event organizer) How can I fetch the actual email (instead of name) so i can use it in ...
0
votes
0answers
95 views

Image is “broken” with Custom Email Twig Template sending with Webform

The setup consists of Drupal 8 + Webform (ver. 5.6 - https://www.drupal.org/project/webform/releases/8.x-5.6) + CKEditor Image Upload (https://www.drupal.org/project/ckeditor_uploadimage). This allows ...
0
votes
0answers
41 views

Simplenews can't send test mail

I am using Drupal 7 and I installed the module Simplenews to send newsletters. I put the file in sites/all/modules in my Drupal installation (local) and I activated the module. The content type ...
0
votes
0answers
47 views

Sending email from custom module

I've created my first Drupal 8 module which is a form that emails its output to a staff person. Everything works except for the email portion which doesn't throw any errors, but just doesn't do ...
0
votes
1answer
112 views

The email doesn't have the DKIM signature it would get from mail()

My web host (HostGator shared server) normally signs outbound emails with DKIM. When I send emails from Drupal 7.69 (and Webform 7.x-4.22 for compatibility with CiviCRM), however, there's no DKIM. ...
0
votes
0answers
108 views

User register with OTP via email (verfification code)

I'm using Drupal 8 and I have the following requirement: Once a user register, before logging in, they need to input a one time verification code received via email and NOT SMS. I've used the ...
0
votes
1answer
69 views

Extract email addresses from composite field type using Computed Twig

I am using a custom composite field type to gather multiple pieces of data from a user. This custom composite field type contains a field which gathers the email addresses entered. What I am trying to ...
-1
votes
1answer
27 views

Allow guests to subscribe to specific taxonomy terms and send them weekly updates/notifications

I would like to display a block to my visitors, where they can enter their email, name and a list of topics (taxonomy terms) they are interested in (e.g. "technology", "health", "science"). When ...
1
vote
1answer
125 views

How can I keep logs of all outgoing emails?

I am using SMTP Authentication Support module to send emails with drupal 8.When I see watcdog mail-log from admin it shows only emails sent for registration or password reset, that is also with single ...
1
vote
1answer
34 views

How to get one time URL when we are writing hook_mail_alter?

My Question is already present here but the previously given answer for my question can applied to Drupal 7 and I can not use the same solution in Drupal 8. I hope it is okay not put the same ...

1
2 3 4 5
28