SO what I would like to do, is have all my emails routed to a PHP script, and then for that PHP script to save it to the correct staff members message box in my CRM.
My CRM is already able to send out emails but I cant seem to allow it to recive messages from customers.
My idea, is be able to keep track of which emails they are sending, and easy access to emails that need there attechion.
The Idea being there would be no need for them to open webmail or outlook.
I have followed this tutorial and it worked for me (using Exim) with a little playing around:
http://www.evolt.org/incoming_mail_and_php
Note: the link seems dead so you might need to look up the Google cache:
http://webcache.googleusercontent.com/search?q=cache:6rwThYgNHe0J:www.evolt.org/incoming_mail_and_php+php+receive+email&cd=2&hl=en&ct=clnk
Related
I've written a small script that simply (as simple as email can be) downloads emails so I can play with them later. The part that I don't seem to be able to grasp quite perfectly is that the msgno can (will) change when new emails get added or emails get deleted. Okay, that's fine, but then for the uid, this also can (will) change when emails are moved from folder to folder.
So in PHP, for example, when I execute imap_search and get a list of msgnos or uids, how do I reliably use these to get emails for a changing email box? In this example, there are multiple Outlook clients connected to this mailbox with many rules for auto-moving emails from/to specific people, etc. that's bound to move emails after I've already gotten the ID's, and before I actually get to processing that email.
In this case, what do you do? I would very much so like to avoid the email just "not existing" by the time I get to it, or worse, the ID in that IMAP mailbox be resigned to a new email.
I want to create a system, where an email is sent to me using smtp and i perform all the validation and some manipulations in HTML. and then send it using SMTP.
Currently i have some applications which are using SMTP as email sender, i want to create a simple layer in between them so that all the emails are sent from this filter, so that i can edit HTML source code and add some tracking links or check weather to send this email or not, depending on the spam and other filters.
This is a great PHP framework for sending emails, its supposedly very difficult to send emails from within PHP its self using the mail() function.
Are you trying to import an email sent from a specific address to you, extract data from that email and then forward the information on? Can we get an example of the email you are trying to extract/manipulate? I feel some more information on the task at hand would make this easier!
EDIT
So if understand correctly you want to program an application that all your other applications interface with and send emails from this new application?
If so there is lots of ways you could do this, I'm not aware of any github solutions (Correct me if I'm wrong) & I don't think any sort of SMTP service offers what you are asking (HTML changing being the big problem I'd imagine).
So what you could do is write an application with an API (referring which application sent the request, desired recipient, email template to use ETC) with all of your different settings/spam filter restrictions stored in database. You could then keep your emails all in a folder within the new application and when you amend them they get sent out.
Another solution would be to create a folder that contained all of the email templates, then create system links (securing X,Y&Z attack vectors) to your different PHP projects which depend on these email templates and do per application filtering (Spam/HTML Changes).
I want to find out if there is a way to read email information from a certain address with php, and take the From,To,Subject,Date and store them into a MySQL database. I would like to either check for new mails on a button click for example, or ideally when an email is received to get somehow the new mail and store the info i want.
I hope i have explained my question well..
it depends if the site is yours.
if you are the owner of it or the coder it is possible to save it while sending simply by collection the info and saving it and only then send the email.
but if the email service itself is not yours (for example Gmail, Yahoo etc..)
you cannot save the data with php. creating a program that reads emails could be possible, but i myself havent gone far enough to make a program that reads sites.
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.
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.