Making of web based email service just like yahoomail,gmail - php

how to make a webbased email service such as inbox, outbox, deletemail, reply ,forward mail etc.
Is it possible to make with PHP. just give some guidelines from where to start.

I don't mean to sound flippant, but you couldn't pick a bigger wheel to reinvent or one more pointless. If you must make your own, look on Google for one of the very many open source web projects that are out there to use as a starting point.

It is possible. You will need a SMTP and a POP/IMap servers. There are a ton of e-mail clients already written in php.
Here is a tutorial.
http://www.devshed.com/c/a/PHP/Building-A-PHPBased-Mail-Client-part-1/

this one is my favorit
https://sourceforge.net/projects/myphpim/

Related

import email data to the DB

I built support system (web) where my helpdesk can open new tickets/issues.
I want my clients to be able to send email with the issue text and file attache, to specific email address, and new ticket will be opened in my system.
For that I need to know how to scan the folder and how to add the email data to my DB.
what do I need to look for, in the internet, for that? what is the subject?
(I'm using PHP)
As the other's have commented, it's likely a larger task than you're ready to handle. But it doesn't hurt to try.
If I was tasked with the job, I'd take advantage of Gmail (for it's spam reducing features and large storage) to accept incoming email. From there, you simply need to setup a script that connects to your email account and processes the email for storage in your database.
Normally I recommend a solid library for making the job easier and cleaner, but I have a suspicion that you may not be familiar with OOP. If you at least know how to utilize classes, then check out Github:
https://github.com/search?l=PHP&q=imap&ref=searchresults&type=Repositories
Otherwise, if you're new and don't mind writing something "messy" then the following should at least point you in a good direction:
Connecting & retrieving emails for IMAP:
http://www.php.net/imap
http://www.php.net/manual/en/function.imap-open.php
Fetching/processing attachments:
(note that attachments are part of the email body)
http://www.php.net/manual/en/function.imap-fetchstructure.php
Storing attachments (in the filesystem):
http://www.php.net/manual/en/function.mkdir.php
http://www.php.net/manual/en/function.file-put-contents.php
There's plenty of Googling left for you to do. So go forth and make a lot of mistakes. Read the manual. Kick yourself for not having read it sooner, then go make more mistakes. Isn't that how most of us learn?
The first thing that comes to mind is to pop the most recent emails if you have pop3 set up or use imap functions. I did something similar to this using c# using openpop.net. So that could be a starting point.
You can use this method, using the cURL to fetch the emails from Gmail server through feed atom. XML response will return and we can convert it to HTML.
http://www.code4share.net/items/get-unread-email-in-gmail-by-php/XRGXVVh.html

php script for sms facility

I'm making a project in my college, and I am making a web application. This web application is in openSuse. So the OS is Linux and I'm writing the code in php.
Now I want scripts in php for including sms facility in my project. So I need full information how to go about it and what code to implement
You need to use an online SMS provider. A quick trip to google brought up this: http://www.messagemedia.co.uk/sms-gateways.html (UK only, search in your country to find one that'll work for you). Then go to their API page and they should give you a nice PHP API to use.
Two basic approaches
Use an online SMS provider, as suggested by many other comments
Use a GSM modem with software like Gammu to handle sending and receiving text messages; almost any USB GSM dongle can handle this.
If I were to do something like this, I would just use the mail() function of PHP.
In the US at least, I think all phone numbers have an email address:
19999999999#sub.carrier.com
If you can extract the carrier from the number, you could just strip all non-numeric characters from the number and use the PHP mail function to send an email to that address, which in turn is a text message. This is how I forward emails via text to my feature phone (funny, the name is misleading).
There are a number of sites that extract information from the number, but I couldn't find an explicit algorithm. Here's one (I bet you could just use file_get_contents() on that webpage to get the carrier): http://fonefinder.net/
It's not too complicated, so have fun!
Have you seen http://www.twilio.com?
It's really cheap and incredibly easy to use. Why reinvent the wheel? :)
Depends on your needs. If you need to send AND receive and be able to process the incoming messages you are going to need more than just a simple SMS provider and are going to need somebody to partition a short/long code (I'm assuming you don't want to spend 1000$/month on a Short Code) to process incoming messages and forward them to you. You can set up keywords, or regular expressions that get run on messages then forwarded to your server.
If you are just going to be using just outbound SMS (notifications, etc.) than you can use something simple like Clickatell or Twilio.

Listserv functionality catchall or not?

I am looking to create a listserv functionality for my website in the style of google groups. That is, someone creates a group and thus, a group email address is born. Should i be using a catchall or should i come up with some way to automatically create a mailbox when someone creates a group?
That really depends on your mail server setup. Your mail server might allow the easy ad hoc account creation, or it might not.
Have you considered using any of the widely-used open source programs (e.g. Mailman) that do exactly what you are describing instead of rolling your own? I would consider it, because people tend to expect mail to work in a particular way, and get a bit upset if it doesn't.

What to use as "spam-filter" when sending emails with PHP mail()?

I have a classifieds website, and on each classifieds page, there is a form for tipping a friend where you just enter the persons email-adress and the tip will then be sent. The form is submitted to tip.php where all "magic" happens with checking and sanitizing etc etc...
Lastly I use php:s mail() function to send the email from tip.php...
Now, I wouldn't want spam-bots and automated robots etc to send mail and blacklist my server.
What should I do?
One method which I would rather NOT use is logging IP:adresses of senders in a table (MySql) and then allow only x emails per sender.
As I said, the above solution is nothing I would prefer, there must be an easier way.
Is there any method you know of?
Is there any application to install maybe, on a linux server which does the job?
Thanks
I would say that the most used method would be captcha. This will ensure that the one that sends the email is a man, but everything can be cracked. So I would recommend to find a really good one, just type captcha into google and you are good to go. Also you can use another method/thing to make it more viable, e.g. some question that can be answered a simple mathematical problem, etc.
I think you should do something in the form which makes it difficult for robots to submit rubbish into it.
Either a piece of Javascript which robots don't run (Hint: The usually don't) or if you MUST, a captcha.
You should definitely monitor the use of this facility, as well as monitoring outbound messages, message queues, and watch for bounced mail though.
Quite a lot of web spam seems to come from humans who are paid to submit rubbish into peoples' forms, which is difficult to block.
You can of course, also use something like Akismet - an API where you can ask them to spam-scan form input; I'm sure its licence terms are very reasonable and if spam is a real problem, paying for it will be acceptable to management (using Akismet is much cheaper than paying expensive developers to write and maintain an in-house anti-spam system)
Unless its a paid for service or you can restrict the recipients to a pre-approved list and can establish the bona fides of the users I would strongly recommend you don't do this. However...
Do have a look at spamassassin - but remember that one of its most important metrics is the Bayesian filtering engine - which needs to be trained using heuristics (but you can run spamassassin for your incoming mail and copy the database to your webserver).
Do make sure that you only allow authenticated customers (with an authenticated email) to use the facility, and limit the rate at which they can send messages (and the number of recipients) using a dead-man's lever.
C.

PHP - How to add stuff from a database into a newsletter?

Hey guys. I need help for a project for school. Essentially, I need to write a program that sends newsletters. I can send the newsletters and stuff, but the main issue I'm having is that the newsletter needs to contain things that are contained in a database. How exactly do I draw those things and put them into a newsletter? The bulk of it needs to be in PHP, but Java and stuff can be used, if needed. Also, I cant install anything on my portion of the schools server, so I cant use any CMS's and stuff.
Unless you are writing this for fun and learning, don't do it.
You will get your IP blacklisted and have lots of problems. there are regulations (CAN SPAM etc) and best practices (SPF, domain keys etc) you need to follow if you want this to be successful. Otherwise you will not get any of your mail delivered, and possibly a call form your ISP.
How do you handle unsubscribes? How are you going to handle bounces? Mail loops? Blacklisting of problem addresses? This is not a simple topic.
You would be better off purchasing a email management system;.
Lyris makes one that you can install. There are other free/open source projects as well (majordomo, mailman etc).
Heed these words intrepid e-mailer!
Hey, do you have basic problems with querying your content from your database?

Categories