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
0 answers
13 views

View past default site contact form submissions

I took on a project for a museum I volunteer for and discovered that the contractor hadn't configured the mail server properly and so any emails sent via the default Core Contact Form, were never sent ...
user avatar
  • 317
-3 votes
0 answers
36 views

Newsletters seen as spam with old Drupal and Simplenews

A few years ago, someone asked me to help with a little website, made in Drupal. It was made by another developer, who was not available any more. He wanted just some little changes and despite never ...
user avatar
  • 1
0 votes
0 answers
42 views

Send username recovery email in html format [duplicate]

I have installed the Forgot My Username module (Version: 8.x-1.2) and it creates subject and body options in the configuration account setting but it seems to use plain text rather html mail. I want ...
user avatar
0 votes
1 answer
45 views

Mails aren't sent

I'm simply trying to send a mail with the following code. function contact_form_mail($key, &$message, $params){ switch ($key) { case 'contact': // Set headers etc ...
user avatar
0 votes
0 answers
10 views

Cannot connect Drupal SMTP from Acquia to AWS SES

We have a Drupal system running on acquia platform and was using smtp for the mail connection. Previously we were using gmail account to sent the mail and was working fine. But now as per the ...
user avatar
0 votes
0 answers
13 views

Webform email interface - accessing submission values

I need to send an email to clients who are registered through a webform, by grabbing their entered email as follows: But I get this error: How can I access individual entered emails in the email ...
user avatar
1 vote
1 answer
27 views

Send "admin (user awaiting approval)" email programmatically to admin

I want to send the "admin (user awaiting approval)" email after creating an account in the user_insert hook I don't know what function is used. I did find _user_mail_notify which works well ...
user avatar
0 votes
0 answers
37 views

PHPMailer SMTP fails to authenticate against Exchange Online while using PHPMailer Oauth2 and an Azure AD application

I am attempting to use PHPMailer SMTP and Oauth2 to send mail via Exchange Online, but, despite PHPMailer Oauth2 being able to get an Auth Token from the Azure application, PHPMailer SMTP fails to ...
user avatar
0 votes
0 answers
23 views

Is there a way I can forward specific Webform Submission Results (from admin) to an email address I enter?

I'm in the process of setting up a "system" where users can submit their Webforms with accompanying details/files and it gets logged into the Webform>Results>Submissions page. This ...
user avatar
0 votes
0 answers
22 views

Load original email content via hook_mail_alter()

I'm hooking into hook_mail_alter() to make an amendment to outgoing emails before they go, but by the time they are loaded by hook_mail_alter(), any token has already been replaced. Is it possible to ...
user avatar
0 votes
0 answers
46 views

Send email with PDF attachment to user that completes the webform

When someone submits a webform that has just two fields (Name and Email) I want the system to send them an email that thanks them for submitting the form and provides a PDF file. Webform enables ...
user avatar
0 votes
0 answers
27 views

Several "from" addresses

I would like to be able to send multiple emails that my site sends from different accounts. Is this possible in Drupal? I use Drupal 8 and SwiftMailer.
user avatar
  • 143
2 votes
1 answer
76 views

Is there a way to check which system was used to send mail?

Is there a way to check which system was used to send mail? I followed Sending html mails in Drupal 8/9 programmatically. I'm using the SMTP module to make sure that emails are sent via SMTP instead ...
user avatar
  • 924
0 votes
0 answers
14 views

E-mail uploaded file from file field in node to user using Rules + Swiftmailer

I have a node type "invoice" which contains a file field "field_invoice" (pdf). I'm setting up following rules action and am searching for a way to rules pick up the file from &...
user avatar
  • 92
0 votes
0 answers
46 views

How can I increase the SMTP email file size?

I have a drupal 7 website with rules 7.x-2.13. There is a rule which sends html email with all the fields whenever a new node is created of a content type. There is a file field as well which allows ...
user avatar
0 votes
0 answers
36 views

Functional test for emails (subject and title)

Question: How can a Drupal Functional Test (extenting BrowserTestBase) check for a certain Mail-Subject and Mail-Body defined in hook_mail in a custom module ? Context: I have a custom module which ...
user avatar
0 votes
1 answer
154 views

Webform HTML Email Fine on localhost with MailHog, Just Text on Server

I Developed a webform on my localhost, testing the Email using Mailhog. Everything looks fine, nicely formatted html emails. When I moved it to my test server at A2Hosting, the emails all show as ...
user avatar
  • 11
-1 votes
2 answers
112 views

How do I sanitize the uploaded files name for sending safely as email attachments?

I have create a form that upload a file. This file is send as email attachment .. $form['cv'] = [ '#type' => 'managed_file', '#title' => 'Votre CV', '#...
user avatar
  • 2,815
0 votes
1 answer
20 views

Replace E-Mails in Webform 8 when dumping to test stage

We sanititze our dumps from production to test so that no newsletter subscriptions, form submissions or ohter things get into the test environement and bad things happen :D Is there a simple way to ...
user avatar
  • 281
0 votes
1 answer
41 views

The <b> tag is replaced by '*' character

While sending out html emails that are configured to use the following template. <p>Submitted on [webform_submission:created]</p> <p>Submitted by: [webform_submission:user]</p> ...
user avatar
0 votes
1 answer
53 views

What is a good way to send out email notifications on creation of a new entity? [closed]

I was trying to see what is the best way to handle customized notifications around the Website Feedback module. The module creates a new entity of type WebsiteFeedback (a custom entity defined by the ...
user avatar
  • 880
0 votes
0 answers
22 views

Attach file to webform submission email from "Entity select" entity

I am trying to attach a file from a entity reference in a Webform. The form is basically like this: information: '#type': wizard_page '#title': 'Information' machine_floor_plan: '#type': ...
user avatar
0 votes
0 answers
29 views

Email formatting for a file field?

I have a webform with a managed file field. I need to send that field in the email as well. I have added the submission:values field, but it doesn't add spaces between the filename and the file size. ...
user avatar
1 vote
1 answer
83 views

Don't see Mail System under Configuration

I'm currently going through the prerequisites of Acquias configuring platform email https://docs.acquia.com/cloud-platform/manage/platform-email/platform-email-configuration/#associate-domain but I do ...
user avatar
  • 11
1 vote
1 answer
35 views

Customized email twig templates

Can anyone tell me if there is a mechanism for creating user registration acceptance / rejection emails from different template files for the default email system ? In admin/config/people/accounts, ...
user avatar
  • 1,710
1 vote
0 answers
286 views

Why is Drupal not sending mail?

When submitting a contact form there is no mail sent, eventhough there is a confirmation message. Or when trying to send a password reset link, everything goes well, Drupal says "If MYMAIL@...
user avatar
  • 227
0 votes
0 answers
28 views

Is the content moderation "log" data available via token?

I have several workflow states with content moderation on a Drupal 9.2 site. I use the Workbench Email module to send notifications on workflow transitions. One of the states is Rejected; the author ...
user avatar
  • 451
2 votes
1 answer
203 views

How to send email with commas in the name?

I am trying to send email of the format: 'Tom Smith, Jr <ts@example.com>'; but it fails due to the comma in the name. This closed issue: https://www.drupal.org/project/drupal/issues/2936032 ...
user avatar
  • 927
0 votes
3 answers
296 views

hook_mail_alter() doesn't remove the Return-Path, Sender, and Reply-To headers

I want to remove the Return-Path, Sender, and Reply-To headers from the sent emails. I am trying to achieve this using the following code, but the headers aren't removed from the email. function ...
user avatar
0 votes
0 answers
152 views

How can I send an email for confirmations via a webform?

I'm fairly new to Drupal development but have been learning quickly. I've been trying to setup my Drupal site to send emails for form submissions confirmations through Webform (I just need us to be ...
user avatar
0 votes
0 answers
56 views

How to have URLs show up as clickable links in Webform submissions sent via Swift Mailer

I've got Swift Mailer and Mailsystem installed on a Drupal 8 site I maintain, mostly to handle email submissions from Webforms. And everything's been working fine — except that just recently we got a ...
user avatar
  • 3
0 votes
0 answers
24 views

Can the Mailchimp module email node content?

I have a blog page. I want to add a sign-up box to collect email addresses so I can email everyone when a new blog entry is added. As I'm on shared hosting, I believe there is less chance of them ...
user avatar
-1 votes
1 answer
157 views

Send HTML mail with plain text mime/alternative (for anti-spam)

We use Webform Drupal 8 module to handle newsletter subscription on a website. An html formatted email is sent to confirm subscription. Unfortunately, this email is sent with only content-type:text/...
user avatar
1 vote
0 answers
193 views

How translate custom email programmatically?

I'm on a D9 Site. I've created a module, where I define a hook_mail, a hook_theme and a preprocess for swiftmailer twig: function my_project_breakout_rooms_theme() { return [ '...
user avatar
  • 500
0 votes
1 answer
61 views

How do I use the mail manager without the $to value?

I want to send an email for multiple users without a to address. Setting $to NULL, and empty string 'undisclosed-recipients:;' doesn't work. How can I send an email with just BCC recipients?
user avatar
0 votes
1 answer
421 views

How can I add an BCC or CC email with programmatically?

I am sending email programmatically and I am using plugin.manager.mail to send email, I want to add a CC ó BCC. Do you know the way to achieve it?
user avatar
0 votes
0 answers
831 views

How can I programmatically create an user account and trigger an activation email?

I developed custom module to create users. And I setup config account setting "Require email verification" to "Require a verification email, but let users set their password directly on ...
user avatar
0 votes
1 answer
126 views

How to send dynamic content as an attachment file in email?

Normally we send files as attachments in the email if they are stored in the file system. $file->uri = 'sites/default/files/file_name.pdf'; // File path $file->filename = 'file_name.pdf'; //File ...
user avatar
  • 2,697
0 votes
1 answer
130 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, ...
user avatar
0 votes
1 answer
81 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 ...
user avatar
  • 35
0 votes
0 answers
24 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 ...
user avatar
  • 351
0 votes
0 answers
44 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="...
user avatar
-4 votes
1 answer
44 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 ...
user avatar
2 votes
3 answers
146 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 ...
user avatar
2 votes
2 answers
412 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 ...
user avatar
  • 129
0 votes
0 answers
55 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 ...
user avatar
  • 129
0 votes
1 answer
165 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, &$...
user avatar
1 vote
0 answers
42 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 ...
user avatar
0 votes
3 answers
291 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 ...
user avatar
0 votes
1 answer
50 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 ...
user avatar

1
2 3 4 5
28