#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    16
    Rep Power
    0

    PHP Email Response Add Delay


    Hi guys,

    I've created a PHP form for my website and have added an email response to it to be sent to the user once they've submitted their details. What I'd like to do is add in a delay of some sort so that the user doesn't immediately receive the email. I'd like to pretend that it's a real person emailing them back instead of them receiving an email 2 seconds after clicking the submit button.

    Any ideas how I'd do that?

    Many thanks
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,126
    Rep Power
    1990
    Place the message in a queue and use a CRON job to process the queue and send the message how ever long after it was entered into the queue.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Dec 2004
    Posts
    3,008
    Rep Power
    376
    you could add a delay but there is no point. everyone knows that these emails you get are automated.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    16
    Rep Power
    0
    Well I don't want that to be the case. I currently send the replies myself to stop this issue as I don't want the user to receive them automatically. I want them to feel that there's a person at the other end of the computer. The form is to sign up to a members club so I want the user to feel welcomed by a club member and not a computer.
  8. #5
  9. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    *lol*

    So your poor users have to wait for their email just so that you can pretend you're sending them manually? Do you really think people in the 21st century a) don't see through that and b) appreciate waiting? I don't.

    Either you really send a personal welcome written by you. Or you get the email out as quickly as possible. But lying and delaying is rarely a good idea. Users aren't stupid, and they're used to getting their stuff immediately.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".

IMN logo majestic logo threadwatch logo seochat tools logo