I'm a noob and seriously confused. I built a form for my website with a php script that validates and sends an email to me when someone fills it out. So, what is an auto-responder? Do I incorporate that some how with my php script, or do I not need the php script at all if I use an auto-responder? Thanks in advance
Autoresponder is automatic mail shooted back to the origin email box , it may contains information like "Thank you for email and will get back to you soon". It can be configured at the mail provider or you can also do the coding for the same. As any user submit the form and he has valid mail , just read his email id in the last and send him the thanks email immediately . Later you can see his feedback and reply again.
An autoresponder is used for automatically sending email notifications when something happens, like you just subscribed to something. Some web hosting companies such as GoDaddy offer autoresponder email features under cPanel. I'm pretty sure big names have them. Just configure it under cPanel. Another way to do this is having a local program check the database for new members and using the program to send email to the new members. I did the second option for educational purposes but the first one should be more efficient.
Related
If a php form is completed and send with the submit button, how can I send an e-mail together to an administrator for example? I want to sent the user's name who created a new user through a form
The creator is coming from $_SESSION['username'].
Can I use the PHP mail function to do this?
If mail is correctly set up in your php.ini file you can use this.
You can also install and use PHPMailer if you want access to a full SMTP server or a lot more fine control over how your email is built.
Yes you can use the mail function. You just have to send the input field value's from the form in the mail function.
Yes. I've posted a rather simple example on SO before which you can take a look at, also there are numerous examples elsewhere on the internet that provide you details for the task.
I'm in need of setting up an auto-response from an email account that I control, based on trigger words within the body of the email. But also, it needs to add/delete rows from a database table based on trigger words sent to this email account (that belongs to my site) and it needs to create a topic, in some cases, within a forum, if sent to a different email address (but on the same server). I know PHP to be able to do this, but not really sure how to trigger a PHP script to be executed when an email gets sent to a specific email address account that I control. Or if there is another solution to accomplish this, please let me know.
This is basically an inquiry on how to accomplish something like this, based on an email sent to a specific email address on my server with words like: "Join", "Leave", "Set Mail", "Set Digest", etc. etc.
There will be another email address account set aside that will need to send those subscribers in the database, the same exact email (Mass Send). This is for a CDB-L ListServ. Kind of old school I suppose, but we want to transfer this ability to our server, since these old school methods still work today and is very much active.
Curious on security issues, what type of server software I'll need and just a basic approach on how to set something like this up.
You can alias your email address directly to a php script if you run your own mail server (on linux this would just be in the /etc/alias file or equivalent where the target was your php script instead of an email address) eg http://www.topwebhosts.org/bbs/board.php?bo_table=server_mgmt&wr_id=73
If not, then your only real choice is to set up a php process that checks an email address for mail every x minutes.
I have used both these methods over the years to great success
You can walk through emails with PHP's IMAP functions and undertake action (based on conditions/content). More info.
Does anyone know where and or how I can build a PHP Script for a Newsletter that would allow the end-user to Forward their received E-Mail to a friend or so?
Basically, allowing them to take the entire body and subject of the e-mail and open up a new E-Mail Draft which would allow them to enter in the contacts they want to forward the e-mail to?
I am fully aware that this function is available in most, if not all, e-mail clients to this day. But it is requested that this functionality be added within the newsletter.
Any guidance? Any concepts? Any feedback would be greatly appreciated.
Thank you!
If I understand you correctly, you'd need to do the following:
in your email create a "Forward to friend" link that directs the user to a php page on a remote server.
On the remote page, create a script that would contain a form asking for the email address of the friends to email.
Use the mail() function (Or 3rd party class) to mail the users
EDIT:
You can take it another step further by using one of Google's API's to automatically grab email addresses from the users account (Like LinkedIn etc.)
Have a look at ZF's Mail class, which allows to fetch emails using POP3 or IMAP and finally decompose emails into parts.
The ZF documentation page provides extensive sample code.
Add link to email which directs user to a web page that contains
<form action="sendmails.php">
<input name="sendto" type="text"/>
...
and send more letters from there..
I am building a basic support request system where the customer can log in and ask a question and an admin can go in and reply and it will set the status to "Responded" and e-mail the customer to let them know someone has responded.
My question is.. I have a "comments" section which is a log of the interaction between the admin and the customer. If I e-mail the customer the initial response from the admin, then I have a feeling they will just hit "Reply" from their email and start communicating through there, and the logs won't be stored.
I could either e-mail the customer and say "Log in to view the response", or maybe if the customer does hit reply I can somehow track it and insert that in the comments table like they did it from the website. If that is even possible?
Just wondering if there is a standard way to do this and any suggestions you may have.
Thanks!
When sending the email to the user you can have it sent from an email address created for that specific ticket. Something that can identify it with your email system to help you route it back to the php ticketing system.
support(ticketnumber)#domain
support12345#mydomain.com
Then it depends on your email server how to go from there.
There are several useful tips at this question that may help or get your started.
How to get email and their attachments from PHP
If you want their reply to be automatically inserted into the DB, you'll have a assign a cron job in your server to run a php script to detect whether there's a reply from a customer (you need a table listing the customers' email and names.
Each time a customer uses the ticket system their email and name goes into this table).
You'll need to connect to your Inbox too via imap or SMTP, and there are scripts to do this (phpmailer, swiftmailer, etc) and "walk" through each email and see if the sender email matches any in your customers table. Then so an INSERT to the comments table.
Anther way is to read through the emails each time the comments page is loaded, but this will cause the page to take longer to load. However, the data will always be more "real-time" compared to cron jobs.
You could use email piping (if your server supports it).
In the subject, you'd have a unique identifier which contains the ticket ID or something unique to the ticket. Example: "How do I eat food [Question: #1234]", where 1234 is the ticket ID.
In your control panel, you would set up an email forwarder to your email piping script.
This tutorial offers the basics to email piping, and I used it as the base for my piping script: http://www.damnsemicolon.com/php/parse-emails-in-php-with-email-piping-part-1
We are developing a email web site.but we are facing problem in receiving and validating the mail.i have the following doubts.can you please help me in clarifying these???
one more important thing is we are not using squrrelmail, qmail etc.
how do we receive emails for users in email web site?
do we save all the received emails in admin's mail box or in database as per the username
(my idea on email web site is,all the incoming mail are stored in admin's mail box and after the email mail is stored in database,and then the mail deleted in admin's mail box.Is it correct.if not how to store the emails in database directly in web site)
what is the technique behind the receiving mail???i think there are various techniques like email piping etc.
is there any special process of creating users for email web site,i mean do we need to create mailbox(i think mail account) for each user at the time of registration.if we need to create mail box for user,can we create it with imap_createmailbox() function.
are the users gmail,yahoomail etc are accessig database or their mail accounts at the time their login??
can we do all these things with imap functions in php??
There are many different solutions to this problem, polling existing servers, adding scripts to run when a message is received or using a gateway like CloudMailin. I wrote a blog post relating to this (it's for rails but almost all applies to php too).
The other problems almost all span from how you setup the first thing. In many cases you could just log the emails directly to your database and retrive them based on the recipient address. I think you need to explain exactly what you want to do with the email? Are you just providing email hosting for your users or are you providing an additional service? If you're just providing hosting then there are simpler approaches available.