What is the best way to send messages from a Contact Us page in a website as a notification email to an administrator ?

So far, this is what I did but I feel like this is not really the proper way.

  • I created a gmail account that will serve as an email sender
  • From the contact us page, I fetched the values from the text fields and sent it using the email library of CodeIgniter using the gmail smtp

The result is that the administrator email will receive an email from the mailsender@gmail.com. What I'm thinking about is what if there are a lot of people that sent a message at the same time ? Problems might arise from such situation. Please pardon my ignorance, I'm quite new at this industry. Thank you for the response.


The typical handling of a Contact Us page is like this

  1. The page contains (at least) the mandatory fields for Name, Email and Message from the user
  2. When the page is submitted, the server creates an email message, using the supplied Name and Email as the sender. This message is then sent using an email library (for example from CodeIgniter) to the SMTP server handling mail for the website's domain.

The administrator (or whomever is configured to receive the Contact Us emails) will then receive email that appear to come from the users themselves, with a subject indicating that the message was sent by way of the Contact Us page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.