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
9 votes
10 answers
13k views

Unable to send e-mail. Contact the site administrator if the problem persists

When my web form is filled and submitted, I get redirected to a page that says: Thank you for submitting. but theres a red warning box there that says: Unable to send e-mail. Contact the site ...
saadlulu's user avatar
  • 1,760
2 votes
1 answer
1k views

Rule to store user's last post date and scheduled rule based 30 day reminder

In this scenario, user's can post 1 node of a specific content type every 30 days (interval changes depending on user role). We are using node_limit to accomplish this; it's doesn't play with rules. ...
Sam Roy's user avatar
  • 53
1 vote
1 answer
221 views

Which Rules condition can be used to email a user when an admin updates their profile?

I am trying to set up a rule (using the Rules module) that will email a user if their user record has been updated by an admin. It is easy to generate an email when their profile is updated, but I ...
James's user avatar
  • 1,191
0 votes
2 answers
2k views

Use hook_cron to send daily mail but I get 4~5 the same mail every day?

I'd like to make all of my partners in my company receive daily metrics like new users, pageviews everyday, I wrote a custom module using hook_cron. This is my code: function custom_metrics_cron() { ...
Hana J. Chang's user avatar
2 votes
1 answer
110 views

How to integrate messaging into a custom module?

I'm working on a custom module to handle time off requests for an intranet site and I'd like to be able to have the module fire off email notifications to a configurable list of users -- specifically, ...
Sean Cunningham's user avatar
2 votes
2 answers
847 views

How to implement a follow author (or user) function? [closed]

Is it possible to implement a Follow button for authors of posts in Drupal 7, so that users can: Follow any one they wish, and Be notified about the new posts of those authors. This sounds like '...
rakibtg's user avatar
  • 1,324
50 votes
4 answers
47k views

How to programmatically send an email?

I'd like to use Drupal's email system to programmatically send an email from my custom module. Is that possible?
Naoise Golden's user avatar
2 votes
1 answer
129 views

How to use Rules to send an E-mail after saving a new comment, to users who checked a boolean in their profile?

What I try to achieve with Rules: After saving a new comment, this comment has to be sent only to those users who've checked a corresponding boolean box on their profile page. Any suggestions?
DrupThai's user avatar
0 votes
3 answers
951 views

How can I set a reminder for a specific user to be triggered on a specific date?

How can I set a reminder for a specific user to be triggered on a specific date (in a Drupal 7 site)? Example: I want to remind the user regarding particular event such as hepB vaccination day. Any ...
rose's user avatar
  • 129
9 votes
3 answers
32k views

How to use [submission:values] in Email template in Webforms

I have the Webform 7.x-4.0-alpha6 version module enabled. I have a Webform node with 20 form components. I added one email in Email Setting and I created the email template where I used the token: [...
chefnelone's user avatar
  • 6,217
6 votes
7 answers
11k views

How to place Contact form in block?

I have to embed a contact form inside of a block, and I'm trying to use the entity.form_builder service, But I'm not sure which entity I should give it, I found Message and ContactForm entity, so what ...
DenLilleMand's user avatar
5 votes
6 answers
13k views

How can I theme the outgoing contact mail?

I want to theme the outgoing mail from the contact module, because the standard output looks horrible. Where can I do this? It's the one starting with admin (http://example.com/user/1) sent a message ...
Fropper's user avatar
  • 71
3 votes
1 answer
1k views

How to iterate over all field collection items in an eMail body using Rules?

I'm trying to write a rule (using Rules) that will send an email to users of a role. Within the body of the email, I'd like to display the contents of a nested field collection. I've tried using what ...
rrirower's user avatar
  • 349
7 votes
4 answers
2k views

How can I send email to user that is not logged in since 30 days?

I am using Drupal 7, and I want to send email to registered users who have not logged in to the site since 30 days; for example, an email saying: Hello user, you are not login since 30 days. Is ...
joelle lonnie's user avatar
2 votes
1 answer
325 views

How to include only an updated custom field in an email created using Rules?

I used the Rules module to create a rule with an event "After update existing content". This rule sends an email to the editing user when that user makes an edit to one of the multiple custom fields ...
Tenz's user avatar
  • 33
1 vote
2 answers
1k views

How to send an email to an author on a specific date using date field specified in a node?

In my content I have one date field which is entered by the author, who fills that as future estimate date like tomorrow or after 1 month. Depending on that estimated date, on that day mail should ...
DINE's user avatar
  • 139
32 votes
4 answers
53k views

How to use drupal_mail() to send emails with custom template

I would like to use the drupal_mail() function to send out emails but with a custom HTML template so that they are in keeping with my website design but I am a complete newbie to hooks and modules etc....
Andy's user avatar
  • 775
8 votes
1 answer
6k views

How to programmatically render a contact form in a theme in D8

How to get the side-wide contact form (feedback) individually displayed in a custom block or other page then /contact (e.g. frontpage)? I've tried this code, but it is not working (are contact forms ...
alexej_d's user avatar
  • 850
7 votes
3 answers
844 views

Use email to validate post, not unlike craigslist

I'd like for anonymous users to be able to post nodes to my site. By default their post is unpublished, but when they submit it, the site sends an email with a verification URL. When they revisit the ...
paul-m's user avatar
  • 2,505
5 votes
1 answer
2k views

Embed a contact form [duplicate]

Is it possible to take a contact form and embed it into a page.html.twig or node.html.twig file? Or is the form only accessible via its contact/machine_name link?
kknoer's user avatar
  • 137
3 votes
2 answers
11k views

How to create a task which run at cron time and send emails to users?

Is there a module (based on cron) which can be used to check a date value form a field and to send email to users 2 days before the date? If there is not, how can I implement this to work with cron?
radu c's user avatar
  • 4,350
0 votes
2 answers
3k views

How do I need to configure SMTP Auth?

I have dedicated FreeBSD box, The email sending without smtp module is working perfectly but very slow. The receiver receives email after almost 15 mins. I checked the maillog it says delays and ...
user avatar
29 votes
14 answers
18k views

How can I stop Drupal from sending e-mails of any kind?

I have a dev, staging, and live server workflow set up on Pantheon. My site has a lot of rules that cause members to be e-mailed for various reasons. I sometimes need to work on these on my dev/...
Patrick Kenny's user avatar
25 votes
5 answers
40k views

How to send HTML email

I am creating a simple module which will be sending HTML emails to users for deals in our website. I have searched a lot, but I can't find a solution proper solution for Drupal. Now I can send mails ...
mrcniceguy's user avatar
20 votes
5 answers
15k views

BCC For drupal mail function [closed]

I am using Drupal 7 and focused to work with email option. I am using the Forward module. How can I add the BCC field in the drupal_mail() function. my default function having, drupal_mail('forward'...
sathish's user avatar
  • 371
15 votes
7 answers
15k views

Which newsletter module will fit my requirements?

I'm trying to implement a newsletter for my users to subscribe to and I'm noticing that there are a lot of different newsletter modules out there. I'm was looking for one that will easily allow me to: ...
Mike's user avatar
  • 866
9 votes
3 answers
10k views

How do you add a PDF attachment to an email?

Goal: I need to send an email with a pdf attachment in Drupal 8. Progress I am able to send an email with subject and message but have never been able to get the attachment. When I turn on the logic ...
Cadre's user avatar
  • 131
9 votes
3 answers
21k views

How to set 'html' email template for webform email setting?

Is there any way to use html email for e-mail template in webform email setting? In my webform node I go to: node/113/webform/emails/1 to change the setting but I don't see any 'html' option. Look my ...
chefnelone's user avatar
  • 6,217
9 votes
4 answers
16k views

How to send email to multiple recipients using drupal_mail?

I am using drupal_mail to send email, $to = '[email protected]'; drupal_mail('$module_name', $key, $to, language_default(), $params = array('username' => 'Tanvir'), $from = NULL, $send = TRUE); I ...
Tanvir Ahmad's user avatar
3 votes
1 answer
875 views

How to use Rules to send an eMail with a body containing all items of a field collection?

I've defined a content type that contains a field collection. The field collection contains 4 fields. When the content is created, it may have one or more of the field collections. I set up a rule to ...
rrirower's user avatar
  • 349
3 votes
3 answers
7k views

Put Site-Wide Contact Form in a Block [closed]

I want to display the contact form inside a block, so that a user can access it directly from another page. Using Webform Module to create a new form would be overkill. Is there a simple way to do ...
mtro's user avatar
  • 982
3 votes
2 answers
713 views

How to send an eMail notification when a specific field of a node or user has been changed?

When a node (or user profile) is modified, is it possible to send an email notification only when a specified field is modified? With the node I have no problem, but I cannot get it to work for a ...
kb8's user avatar
  • 457
2 votes
1 answer
273 views

How to use Rules to email users when any field(s) is changed in a node (and include the unchanged/changed values for that field)?

I know how to email using Rules when a field in a node is changed and add conditions for particular fields whether they were changed. But I would like the email to contain the info which field(s) ...
hkdalex's user avatar
  • 121
2 votes
2 answers
246 views

Is there a way to send emails when someone logs in?

Logins on my sites are very infrequent and are normally done by myself. I would like a way of getting email notification when someone logs in. This way I might be able to spot someone hacking into the ...
jamie's user avatar
  • 125
2 votes
1 answer
1k views

How to send an email using a field key?

I am attempting to send an email to a field selected value using the Rules module. The user selects a faculty member and saves the node. The rule should fire off and email based on the field's key. I ...
Andrew Roseman's user avatar
2 votes
1 answer
544 views

How to send out email based on matching taxonomy terms in user profiles?

I'm using profiles 2 and have (one or many) taxonomy terms that can be selected by a specific profile type. I have a webform that also has this taxonomy term in the select list. When the webform is ...
Sharon Dankwardt's user avatar
2 votes
2 answers
6k views

How can I email all registered users?

A lot of similar questions show up in Google, but I can't find a solution for Drupal 7.
Mawg says reinstate Monica's user avatar
1 vote
1 answer
2k views

Send email of form data?

I have a block module that looks like this: Created in the following way: function VL_newsletter_signup_block_info() { $blocks['my-block-id'] = array( 'info' => t('Enjoy Stories? - ...
Scott Lawrence's user avatar
1 vote
3 answers
1k views

Limit account applicants with certain email addresses

Hi I am working on a website for a student organization of my college. In order to prevent spams, I have been looking for ways to limit account applicants only with email addresses from the college ...
user4109's user avatar
1 vote
2 answers
2k views

HTML tags not supported when sending emails in Drupal 8

This is my code to sending email function hook_mail($key, &$message, $params) { $options = array( 'langcode' => $message['langcode'], ); switch ($key) { case '...
user avatar
0 votes
1 answer
238 views

Taxonomy terms follow/unfollow module (even for anonymous users)

I want a subscriptions/notifications like module which works for anonymous users too. Users should be able to subscribe to a taxonomy term, and then be alerted if content is created for that term. ...
Pratik Bothra's user avatar
-2 votes
3 answers
478 views

How to create a rule to email all users with a profile field X with same value as the current-user?

I'm using Drupal 7.57 and I have 2 roles in my website, role X and role Y. I want to compare a field (field_code_postal) of the X member profile of the current-user, with the fields (...
Quentin's user avatar
  • 23
15 votes
3 answers
25k views

Send attachments with drupal_mail

I'm trying to send attachments with my email from Drupal. In my custom module i have added: class SponsorprogramMailSystem implements MailSystemInterface { /** * Concatenate and wrap the e-mail ...
andeersg's user avatar
  • 329
14 votes
3 answers
16k views

Set the "from" header in the email to be in the format "Full Name" <[email protected]>

How can I change the from header in the email sent from Drupal to be in the format "Fullname" <[email protected]>? I managed to do it on a Drupal 6 site at one point in the past, but I no ...
maxedison's user avatar
  • 1,231
11 votes
5 answers
2k views

How can I allow users to receive e-mails whenever I update my blog in Drupal 7?

I have a blog in English and Japanese in Drupal 7. I created this blog using a custom content type and Views, not the built-in blog module. I have an RSS feed (made in Views) for each language. I ...
Patrick Kenny's user avatar
9 votes
3 answers
7k views

Email a Whole Node (Including template contents)

I have created my own custom node.tpl.php file. I now want to email the entire node, each time the user creates a new node of that content type (I have made sure that all the HTML in my node.tpl.php ...
big_smile's user avatar
  • 2,828
8 votes
3 answers
2k views

How do I allow regular non-admin users to view other users' emails?

Email is now an included field in core, but the stock email for users seems to be set to private; only users with administrator privileges or the user themselves can see. I'd like to allow other ...
W01F's user avatar
  • 433
8 votes
5 answers
7k views

How can I remove preview button from contact form?

How to turn off preview in contact form in Drupal 8.1.x
SakaSerbia's user avatar
7 votes
1 answer
5k views

"user:one-time-login-url" token not getting replaced by token_replace

I'm trying to send e-mails to users manually by using the hook_mail_alter hook. The following is my function in its entirety: function custom_module_mail_alter(&$message) { $email = '[user:...
Peter's user avatar
  • 691
6 votes
1 answer
9k views

Drupal 7 webform module is not sending email properly

I have this modules enabled in my Drupal 7 site: Mail System v7.x-2.34 Mime Mail v7.x-1.0-alpha2 Smtp Authentication v7.x-1.0 Webform v7.x-3.19 I have configured Mail system to "format" mails with ...
Jaime Rivera's user avatar