Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

automatic reply

Featured Replies

hi.

 

does anyone know how to script for an automated reply?

 

i want to have a system that whenever someone sends me an email or even fills in the site's contact form and sends the message, then they receive an email(for example from noreply@... which is automatic response) just to let them know that we have received their message

 

my hosting doesnt support this service so i thought maybe we can do it in another way for example php or something else...

 

 

please help

 

thanks

If your current webhost has cPanel there's an application in there you can use auto-respond and set to noreply@.....

 

etc etc

 

If your host doesn't support it then I would either suggest moving hosts (which we can do) or searching Google for a script.

 

Lee

this is what i do in asp classic.

<%

if request.form("Submit") = "Submit" Then 'email system

sch = "http://schemas.microsoft.com/cdo/configuration/"

 

Set cdoConfig = CreateObject("CDO.Configuration")

 

With cdoConfig.Fields

.Item(sch & "sendusing") = 2 ' cdoSendUsingPort

.Item(sch & "smtpserver") = "localhost"

.update

End With

 

Set cdoMessage = CreateObject("CDO.Message")

 

With cdoMessage

Set .Configuration = cdoConfig

.From = request.form("textfield3")

.To = "support@whatever.co.uk"

.Subject = "Question from whatever website --"&request.form("textfield4") & "--"

'this will need to be changed when the website domain is working.

 

.htmlBody = .htmlBody & "<table width='95%' border='0'>"

.htmlBody = .htmlBody & "<tr>"

.htmlBody = .htmlBody & "<td>Subject: "&request.form("textfield4")&"</td>"

.htmlBody = .htmlBody & "</tr>"

.htmlBody = .htmlBody & "<tr>"

.htmlBody = .htmlBody & "<td> </td>"

.htmlBody = .htmlBody & "</tr>"

.htmlBody = .htmlBody & "<tr>"

.htmlBody = .htmlBody & "<td>"&request.form("textarea")&"</td>"

.htmlBody = .htmlBody & "</tr>"

.htmlBody = .htmlBody & "<tr>"

.htmlBody = .htmlBody & "<td> </td>"

.htmlBody = .htmlBody & "</tr>"

.htmlBody = .htmlBody & "<tr>"

.htmlBody = .htmlBody & "<td>From: "&request.form("textfield2")&"</td>"

.htmlBody = .htmlBody & "</tr>"

.htmlBody = .htmlBody & "<tr>"

.htmlBody = .htmlBody & "<td> </td>"

.htmlBody = .htmlBody & "</tr>"

.htmlBody = .htmlBody & " <tr>"

.htmlBody = .htmlBody & "<td>Email Address: "&request.form("textfield3")&"</td>"

.htmlBody = .htmlBody & "</tr>"

.htmlBody = .htmlBody & "<tr>"

.htmlBody = .htmlBody & "<td> </td>"

.htmlBody = .htmlBody & "</tr>"

.htmlBody = .htmlBody & " <tr>"

.htmlBody = .htmlBody & "<td> Telephone: "&request.form("textfield5")&"</td>"

.htmlBody = .htmlBody & "</tr>"

.htmlBody = .htmlBody & "</table>"

 

 

.Send

 

End With

 

Set cdoMessage = Nothing

Set cdoConfig = Nothing

response.redirect("thankyouemail.asp")

 

 

end if

%>

 

Then before the redirect do another CDO.Message and send to the user, substituting the 'To' with the users email address.

 

Dan

  • Author

thanks dan.

 

let me explain my website.

 

its main content is all flash and the contact form is written via php and action script 3.0.

 

how do i introduce it to the asp you told me...

 

????

i want to have a system that whenever someone sends me an email or even fills in the site's contact form and sends the message, then they receive an email

These are two different goals. When someone submits a contact form, the process is synchronous: they submit the form, your script can then send them an e-mail (see PHP's mail API).

 

When you're talking about replying to messages arriving in your inbox, you have two possibilities. If you have access to the mail server/MTA itself, you can probably insert a filter which can send auto-replies to every received message. E.g. on Postfix you can insert an after-queue filter (which can be a C/C++ program or an interpreted script like Perl) which sends a return receipt to the sender. Other MTAs have other techniques, and many have standard plug-ins to do what you want. That's the synchronous way of doing it.

 

The asynchronous way involves writing an application which regularly polls your inbox to see if new mail has arrived, checks the mail and sends receipts back to the sender. This is more tricky, but doesn't involve delving into the docs for your MTA. A simple example would be a PHP script which runs every 5 minutes or so via a cron job, using the PHP CLI; alternatively a Perl script via cron. For higher traffic volumes, C++ or Java applications can run as daemons (not cron jobs), maintain persistent connections to the inbox, and therefore have higher update rates (e.g. every 30 seconds). You can find example scripts by Googling; for example, for autoresponder script. While this method seems more complex, it has the advantage that a second server (separate from the MTA processing inbound mail) can be responsible for sending new receipts. Thus the MTA is freed to efficiently concentrate on delivering mail correctly.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.