Skip to main content

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
-2 votes
1 answer
42 views

Custom structure for multi-step webform's submission

I need to send webform submission data in an email with a specific structure: <h2>Wizard Page 1 Title</h2> <table> <tr> <td>Element Title</td> ...
Lena's user avatar
  • 1
0 votes
2 answers
56 views

Webform mail formatting broken after moving to symfony-mailer-lite from swiftmailer

In march 2024 we left swiftmailer and switched to symfony-mailer-lite. Everything looked well until we found that the font for mails which had no template specified in our theme had a default font ...
macbert's user avatar
  • 363
0 votes
0 answers
26 views

Webform sending emails when submission is created and completed - duplicate emails

We have a webform set to email both a notification and a confirmation after a user submits. Under ADDITIONAL SETTTINGS, Send email, only "When submission is completed" is selected for both. ...
tcweb's user avatar
  • 1
1 vote
1 answer
94 views

How should I troubleshoot a problem with sending email?

I have a Drupal 9.5 test server and a production server. The test server is working fine but the production server suddenly stopped sending emails (new accounts, custom form output, etc.). The ...
Chanel's user avatar
  • 105
0 votes
0 answers
34 views

Can i add my custom user field to a user mail template? [duplicate]

I added a custom user field (/admin/config/people/accounts/fields) with machine name field_about_user to my D9.5 site (yes i know, it needs updating...). Now i tried to add that field to the Mail ...
sirtet's user avatar
  • 63
0 votes
0 answers
28 views

Open Social and Swiftmailer Emails Using IP Address instead of domain in some email notifications

Drupal: 9.5.11 OpenSocial: 11.9.14 Swiftmailer: 8.x-2.3 Most of the email notifications in my set up work correctly. I'm having a hard time narrowing down which are problematic but it seems like at ...
Roland Snowe's user avatar
0 votes
0 answers
12 views

Received Webform email does not show the @ symbol

When we receive webform submissions emails, the email element is not allowing the @ symbol to pull through. The email are displayed with the word at instead of @. Example - steve [at] google.com. ...
K CON's user avatar
  • 1
-2 votes
1 answer
55 views

Is there a module/way to send an email quarterly to a list of people about all the new content that has been published since the last email?

I need to be able to take all the users who sign up for updates on a webform and on an editable frequency email them the new content (that I choose to send them) that has been published since the last ...
Eluchel's user avatar
  • 387
1 vote
1 answer
530 views

How do I override settings.php for Symfony Mailer to use Mailhog for local development?

Now that I am supporting Drupal 10, I needed to set up Mailhog to allow local capturing of emails when I'm testing in my local Docker environment. I used to use the SMTP and Mail System modules and ...
ChumKui's user avatar
  • 179
0 votes
1 answer
382 views

How can I programmatically stop webform from sending an email?

I need to stop sending my webform submission email programmatically and conditionally. By conditionally I mean I have two contact forms and two locales on my Drupal application. I have a custom ...
irohit786's user avatar
0 votes
1 answer
385 views

How do I implement email dispatch with Drupal Symfony Mailer from scratch?

I'm implementing a cron job that should send a notification email to all users that meet a certain criterion. I created a Service implementing the CronInterface and hook_cron calls this service's run()...
flauschi's user avatar
0 votes
0 answers
45 views

Is it possible to batch send email submissions from a Webform?

I'm using a webform to send emails to around 100 people at a time, by sending a submission to all authenticated users. The Drupal side of things handles this fine. However, the email service I'm using ...
xpress's user avatar
  • 1
2 votes
1 answer
33 views

How can I email admin when stock is 0?

I'd like to email the admin when the stock is 0. In one option, I've tried to set a condition in rules based on the stock field, but I can't get the field to display in Entity has Bundle. Are there ...
gscerb's user avatar
  • 21
1 vote
0 answers
29 views

How can I use a template for display mode with the Mailchimp module when I add an article?

How can I add a specific template for a display mode with the Mailchimp module? I created a new display mode (mailchimp); then I selected it in /admin/structure/types/manage/article/display. I tried ...
mankin's user avatar
  • 11
1 vote
0 answers
317 views

View connection info from Webforms to SMTP

I have a Drupal 8 site with webforms and the site is configured to use our Office 365 for mail. The site's SMTP settings are right because I have been getting auto-generated emails about out-of-date ...
Hometoy's user avatar
  • 112
0 votes
2 answers
38 views

Email does not contain a link to the file attached to the contact form

I am using the following code that programmatically creates a file and attaches it to a file field when a contact form is submitted. function mymodule_form_alter(&$form, &$form_state, $form_id)...
Anche's user avatar
  • 11
0 votes
0 answers
192 views

How do I programmatically attach a file to a webform submission

I'd like to attach a custom file to an email of a webform submission. That means, I want to add the file as email attachment without an existing webform field (document file) or similar. My idea was ...
Alex's user avatar
  • 1
1 vote
1 answer
120 views

How can I add HTML links in e-mails?

$content_title = $translated_entity->getTitle(); $url_alias = \Drupal::service('pathauto.alias_cleaner') ->cleanString($content_title); $content_link = <<&...
Matoeil's user avatar
  • 3,443
1 vote
2 answers
228 views

Replace MessageTemplate with token value and send the message

I'm having some trouble getting the tokens in my Drupal 9 message template to work properly. I have created and saved a message in my UI using the structure->message templates section, with a ...
Adamssef's user avatar
0 votes
1 answer
88 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, ...
aharown07's user avatar
  • 392
5 votes
1 answer
1k 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['...
Pedro's user avatar
  • 51
1 vote
1 answer
1k 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.
markus's user avatar
  • 13
-3 votes
1 answer
214 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 ...
beltazzar's user avatar
0 votes
0 answers
19 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 ...
testing12345's user avatar
2 votes
0 answers
53 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....
Basil Vlasyuk's user avatar
-2 votes
1 answer
43 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 ...
kankari avinash's user avatar
1 vote
1 answer
175 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 ...
S Waite's user avatar
  • 11
0 votes
0 answers
55 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)...
Dimitris Markopoulos's user avatar
0 votes
0 answers
37 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 ...
László Moldoványi's user avatar
0 votes
0 answers
72 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 ...
mamesaye's user avatar
  • 261
2 votes
0 answers
374 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 ...
FrankDesign's user avatar
0 votes
1 answer
74 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 ...
Coolguy31's user avatar
0 votes
0 answers
77 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 ...
Prem Shankar's user avatar
1 vote
1 answer
495 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 ...
Sébastien Gicquel's user avatar
0 votes
0 answers
51 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 ...
richardparkerpi's user avatar
0 votes
0 answers
35 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 ...
Andrew Morris's user avatar
0 votes
0 answers
67 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.
Richi RM's user avatar
  • 143
2 votes
1 answer
461 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 ...
Joost's user avatar
  • 1,348
0 votes
0 answers
97 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 ...
Sherry K's user avatar
0 votes
0 answers
134 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 ...
Bernhard Zürn's user avatar
0 votes
1 answer
657 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 ...
Jim D's user avatar
  • 11
-1 votes
2 answers
697 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', '#...
Matoeil's user avatar
  • 3,443
0 votes
1 answer
23 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 ...
macbert's user avatar
  • 363
0 votes
1 answer
46 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> ...
Samuel Fernandez's user avatar
0 votes
1 answer
166 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 ...
anoopjohn's user avatar
  • 938
1 vote
1 answer
231 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 ...
DSmith's user avatar
  • 11
1 vote
1 answer
336 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, ...
sisko's user avatar
  • 1,720
1 vote
0 answers
1k 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@...
C.A. Vuyk's user avatar
  • 227
2 votes
1 answer
316 views

How to send email with commas in the name?

I am trying to send email of the format: 'Tom Smith, Jr <[email protected]>'; but it fails due to the comma in the name. This closed issue: https://www.drupal.org/project/drupal/issues/2936032 ...
liquidcms's user avatar
  • 1,278
0 votes
3 answers
1k 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 ...
secretsayan's user avatar

1
2 3 4 5
28