Like Wordpress and Blogger have. For example, I send an email to something_blog_post#myblog.com and the email that I sent would be transformed in a post on my blog.
There are services like mailgun that make this fairly easy to do since they convert inbound email into API calls.
The alternative is to find a way to poll IMAP with PHP, then parse the messages. This is probably a whole lot harder.
There are several solutions to this problem:
Firstly, you can setup a system to poll an existing IMAP or POP3 system and return the result.
You can setup an email server which will call a script itself upon receiving an email.
You can use a third party provider (such as CloudMailin or MailGun).
I wrote a blog post a little while back outlining some of these options for Rails applications but they all apply directly to PHP too.
Related
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).
My Bolt site lists a lot of events. Can I use the Simple Forms extension to email a list of events to a visitor?
Yes you can, but I would advise against it - a better way would be to use a real mailinglist (mailchimp or campaignmonitor are great for mailinglists)
The problem is that you create an open relay for spambots with a simpleform that is used as a place to send anyone mail - it is meant to be used as a contact form where visitors can send messages to the site owner
If you still want to use it to send visitors a list of events - you can look at the "use_as" parameter for emailfields in the documentation.
Im building an email management software using PHP. Im a bit stuck on something, and thought SO might provide some insight. The user retrieves messages. Messages get replied. I was thinking that I could create some sort of custom hash for an incoming message, store the data and hash in the database, and then for replies, inject the custom hash into the message header to denote that this message being sent is apart of that particular incoming message.
After I reply to a message, and then the user re-replies, will the injected custom hash be in the message? If not, it would be treated as a new incoming message.
Should I be looking into injecting custom hashes into messages? Is that even possible? Is it a good method?
Is this a good theory to use? Any suggestions or comments? I really have no experience in this and Im just trying to figure out the best method for implementation.
** NOTE: If there are any open-source PHP email management software that I could reverse-engineer, that would also be something I would be interested in looking at.
Injecting custom headers into the message is possible but it's pretty rare that they would be included in the reply. Sometimes, clients will include a In-Reply-To header, that quotes the original message id and you can use that.
However, the easiest and most common method of doing this is by using a customised from address. If you send the email from message-12345#yourdomain.com then any bounces or replies will come back to that email address. If the next message uses message-12346#yourdomain.com then you can easily tell which reply is for which original message.
There are a few options when receiving the emails:
Poll using POP3 or IMAP
Have the mail server init a script as messages are received
Use a system that converts the emails from SMTP and forwards them as HTTP
I wrote a blog post outlining the methods to receive the messages, it was for Ruby but the same principals all apply. Unfortunately I don't know of any PHP software for this.
I wanted to create (or at least learn/know how it is done) application(or configuration?) that does similar to what craigslist does when people choose to hide their email with the "anonymous" option when making posts. I suspect that it is done with what's called email relaying. I'd like to find out how it is done in process - from when user enter their email to receiving an email via an anonymous email address. I come from a "LAMP" background at an intermediate level so please bear with me and kindly explain.
Your responses/comments/suggestions/pointers are greatly appreciated.
Thank you
The easiest way to do this is to receive email with your php app. There are a wide range of ways to do this, collecting using cron, piping from an email server directly into your app or using a third party like CloudMailin.
I wrote a blog post explaining some of the methods you can use to receive incoming email using php here. The post discusses rails but the principals are the same for most languages and frameworks.
Is it possible to create a gmail gadget with a button that would send a message's sender, subject, date and content via POST to some PHP page?
If so, any clues as to how this could be done?
I have been asked to integrate this as part of a small CRM, not sure if it can be done.
Thanks!
Contextual Gadgets might cover what you need, alternatively you could fetch the messages externally using the Mail feeds.
In either case, you will need to be authorised either via the Google Apps Marketplace or directly from the domain administrator by setting up OAuth credentials.
It's highly unlikely; the emails are considered private, no gadget should have access to them.