In many cases, we want to send 2 emails after an inquiry form submitted.

  1. One email is to notify the admin(or manager) there was an inquiry submitted and the admin can reply directly via email
  2. Another email is to inform the customer(inquiry submitter) that his/her inquiry has been received

How to send an email after form submitted?

  1. You will need to config your .env to set up proper send email parameters. eg. SMTP server, username/password
  2. Set up the proper MAIL_FROM_ADDRESS in the .env to avoid spam
  3. You should already have the above settings done if it's an existing Laravel project. Then go to the default inquire form setting section(usually is under the homepage)
  4. Set up below things:
    1. What will be displayed after the form is submitted successfully (This is the email body content)
    2. The inquiry received email subject send to the submitter (This is the email subject)
    3. Inquiry submitter reply email to this email address (By default it use the MAIL_FROM_ADDRESS in the .env, but you can change it)

    Now, everything is ready, you can have some test afterward.

    Email example for the customer(inquiry submitter)

    Joe,We've got your inquiry
    
    Thank you for submitting the inquiry!
    
    We will contact you in 3 working days!
    Hey there,
    
    Just want to know do you provide a hosting service for the Laravel CMS?
    
    Joe 
    Email example  for the admin:
    You have got an inquiry from Joe
    
    Hey there,
    
    Just want to know do you provide a hosting service for the Laravel CMS?
    
    Joe