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
-1 votes
0 answers
37 views

How to stop receiving "Mail failure - rejected by local scanning code" to my email?

I have several Drupal 9 websites. My hosting provider doesn't support Drupal so to get emails from contact forms I use SendGrid. But, in the website administration section (/admin/config/system/site-...
0 votes
0 answers
18 views

Send email immediately on subscribe?

I've looked through the Drupal 8 documentation for the Message Notify and the Message modules. They don't seem very complete, so I'm hoping to get additional info. I have several nodes that exist on a ...
0 votes
1 answer
33 views

Can a Rules action send an email to all users that have set a flag?

I've found some older Drupal 7 info on this, but not much for Drupal 8+ yet. What I want to do: Give users the ability to set a 'notify me' flag on nodes When a comment is added to the flagged node, ...
  • 193
4 votes
1 answer
248 views

How can you attach a file to a mail using Symfony mailer?

I want to attach a file to a mail from an input file in my form. Here is how I build the mail : $mailManager = \Drupal::service('plugin.manager.mail'); $params['title'] = 'title test'; $params['...
  • 41
-1 votes
1 answer
38 views

Sending attachments in mail does not work

I have created a form using the Form API in Drupal 9. After submit, it receives the files. I also gather the file data which is needed according to the docs. https://www.drupal.org/docs/contributed-...
1 vote
1 answer
905 views

How can I send more than 5 emails per hour?

Drupal doesn't allow to send more than 5 emails per hour from a contact form. Can this value of 5 be changed somewhere? I need to change it for testing.
  • 1
-3 votes
1 answer
90 views

How to make Drupal to login and send email via Gmail? [closed]

I have a Drupal 9 website with a core contact form (I don't use Webform). I have two Gmail accounts, one by which I want to send email and one to which I should receive the email. So I need a way to ...
0 votes
0 answers
16 views

How do I insert the corresponding text content from source into email based on selection?

I have run into a wall trying to find a solution to this problem and am hopeful someone here may have some feedback or ideas. (I'm on Drupal 8 btw) A department in my organization wants a form with a ...
2 votes
0 answers
29 views

Changes in email template are saved, but not used (cache?)

I'm usually trying to find an answer/clue on my own, and usually it works, but at this time search is fruitless. So I'm trying to edit a welcome email text, using /admin/config/people/accounts section....
-2 votes
1 answer
35 views

How can I send an email if there are any change in fieldname values (example email, stats of task) by checking from existing database

I need your help or suggestions in create custom module where I need send an email to user and admin if there is any status change in ticket or field values changes (such as description updated) in ...
1 vote
1 answer
53 views

How do I perform a "contains" match with #states?

I use the same form for different events. Previously I have set up a conditional email to be sent based on the exact title of the event. However, I would like to have the conditional email be sent ...
  • 11
0 votes
0 answers
42 views

Wrong email content is sent during user activation

When admin blocks or unblocks (activates) a user account a different email body is sent to the user from that which exists in admin/config/people/accounts page. The site is multilingual (two languages)...
0 votes
0 answers
27 views

Registration e-mail body translate doesn’t work

Admin page: /admin/config/people/accounts Tab: Welcome (no approval required) The translation of the subject of the e-mail works perfectly. However, the translation of the body of the email does not ...
0 votes
0 answers
43 views

How do I send a notification email as soon as file is uploaded from the node add/edit form?

I have a media video content type that has a video file field (takes a file), name, and air date. The video files are saved on amazon S3 not locally. I want to monitor the files that are uploaded and ...
  • 251
2 votes
0 answers
169 views

How can I connect to Office365 mail server using OAuth to send email?

I am using SwiftMailer to connect to an Office365 email account. So all emails issued from the Drupal site are sent via the SMTP server on Office365. However, from October 2022, Office365 will no ...
0 votes
0 answers
13 views

How can I add a hyperlink to some text in the Welcome Email [duplicate]

I am trying to add a basic link in the new registration welcome email. The link is rather long and I would like to make this a simple hyperlink in the email. If that form was HTML I could simply wrap ...
0 votes
0 answers
14 views

View past default site contact form submissions [duplicate]

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 ...
  • 317
0 votes
0 answers
45 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 ...
0 votes
1 answer
52 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 ...
0 votes
0 answers
37 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 ...
0 votes
0 answers
15 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 ...
1 vote
1 answer
192 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 ...
0 votes
0 answers
492 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 ...
0 votes
0 answers
36 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 ...
0 votes
0 answers
24 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 ...
0 votes
0 answers
169 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 ...
0 votes
0 answers
39 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.
  • 143
2 votes
1 answer
234 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 ...
  • 1,058
0 votes
0 answers
61 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 ...
0 votes
0 answers
77 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 ...
0 votes
1 answer
353 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 ...
  • 11
-1 votes
2 answers
338 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', '#...
  • 3,095
0 votes
1 answer
21 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 ...
  • 303
0 votes
1 answer
42 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> ...
0 votes
1 answer
92 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 ...
  • 900
1 vote
1 answer
121 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 ...
  • 11
1 vote
1 answer
133 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, ...
  • 1,730
1 vote
0 answers
551 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@...
  • 227
2 votes
1 answer
226 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 ...
  • 1,008
0 votes
3 answers
582 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 ...
0 votes
0 answers
288 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 ...
0 votes
0 answers
80 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 ...
  • 3
0 votes
0 answers
26 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 ...
-1 votes
1 answer
321 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/...
1 vote
0 answers
255 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 [ '...
  • 645
0 votes
1 answer
71 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?
1 vote
1 answer
725 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?
0 votes
0 answers
1k 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 ...
0 votes
1 answer
268 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 ...
  • 2,765
1 vote
1 answer
320 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, ...

1
2 3 4 5
28