


To do that we need to use a PHP class, PHP mailer seems to be the most wildly used and to use that we can install SMTP Module. Even though it is possible to install these, check the details at the end for that, you are best to use an SMTP server to send email from your Drupal site. The main possible reason for this is that the server doesn't have the mail modules installed. If you try to send the form you will probably get errors, if you don't then you are lucky. In the next section, we will look at sending email from a Drupal site. Okay with that done we should test that it can send a message. Only has the message field on it but default. Make the Preview button on the Contact Forms to obey the "Manage form display" field settings. If you read this before 9.1.3 is released here is the issue.

#USING FORMS TO GO TO SEND VIA SMTP PATCH#
Remove the Preview Buttonīy default the preview button and the functionality to remove it doesn't work, you need to patch it to remove it, the patch has been committed and will be in 9.1.3. You can also drag the field to the disabled area if you don't want one of the fields to show. This re-arranges the order in which the form fields are displayed to the customer or user. If you want to remove any of the default fields you can do that on the manage form display page. The default fields are enough to get started. You do have to be careful about what you allow an anonymous user to upload, however, so keep this in mind. The field types that are available include select menus, checkboxes, input, text areas, and images. Read more about Adding Fields to Drupal if you are unsure about what to do. You can add fields just like any other content/entity type to customize the data collected. Make this the default form - The default form is shown at /contact URL all other forms are at contact/name-of-form.Weight - this is a Drupal thing, it is the order in which it is displayed on the contact form overview page.Auto-reply - Send an automated message telling the person what to expect, I.e.Redirect path - A path to a page, could be a custom thank you page with valuable information and another CTA or message.The case where you might want it to blank is if you use the next options which is a custom path and page that a person submitting the form gets redirected to. Message - a message that is displayed in the highlighted regions, leave blank if you don't want to use it.The basic settings that need to be configured are on this page, the ones with an * are required the others are optional. It can also be viewed and used at /contact Edit contact form However, you can create as many different forms that you please. This will be the one you will want to use. Site-wide Contactīy default, there is one feedback form already available and you can manage it at /contact/manage/feedback However, it is good to know that you can have an internal message system out-of-the-box. I won't cover this as on a simple install the chances are you will only have 1 or 2 users. You can send email between users of the site. To do this visit the Contact forms page.īefore looking at the configuration, however, let's look at what the Contact module consists of as there are 2 types of forms. Since Contact is installed with the standard install all you need to do is check some basic configurations of the form. Requires Part of Core with No extra requirements. InfoĪctively maintained Yes, ships with core. I will cover this in detail after setting up the contact form but be warned this is important. Drupal 9 has the contact module, you can start using this straight away but be aware that your server needs to be able to send mail or you need to use an SMTP server to send your mail. To enable a contact form in Drupal 9 is easy.
