I need to develop a system where a user can sign into our site and have their own unique uploading email address (how to create email ids on a shared hosting with php automatically?). They can then use that address to send their pictures from their mobile phone and have it uploaded to the site. The website Flickr.com has this functionality, below are the instructions that they give their users:
Go to http://www.flickr.com/account/uploadbyemail/ on your desktop and sign into Flickr. You will receive a unique Flickr email uploading address.
Create a new email message on your phone and attach the photo you want to upload. Use the photo title in the subject line and photo description in the body.
Send the email to your Flickr email uploading address. Your photo will be posted to your to your Flickr account, with title and description displayed.
Any ideas on how to do this? Please help!
Many thanks in advance.
Edit:
I have tried using the imap functions to parse emails. I have a gmail account and tried the following code:
$authhost="{pop.gmail.com:995/pop3/ssl/novalidate-cert}";
$user="email#gmail.com";
$pass="password";
$mbox=imap_open( $authhost, $user, $pass );
$check = imap_check($mbox);
print 'Total messages: '.$check->Nmsgs;
But the problem is this code returns a number which is less that actual number of messages in my inbox. How to solve this? Any idea?
Either pipe the email to a script rather then a mailbox/dir on your server, or search mailboxes & parse mails with the imap plugin.
Related
i developed a web application with personalized email through my cpanel (admin#tailorsmind.com), connected it with my application through php (swiftmailer) in the source code, emails are going through for registration, login and forgot password but the problem I am simply having is my website logo won't simply just show up in each email that is sent.
I logged in the email in outlook, tried checking for image settings but couldn't get one.
also created a gmail account with the email and uploaded a logo but still not getting the result i am looking for . Please help !!!
it just keeps showing that question mark you see there and i don't want that.
Is there any way I can control the contact image when sending an email via PHP even if i'm not on the recipients contacts?
Profile pictures is a functionality proposed by emails client. In you case, Gmail, the user #Sports might have created a Google account with his own email address and then set up a profile picture.
More about creating an account without gmail
I'm constructing HTML emails in PHP with Zend_Mail and I'd like to embed/attach/whatever some images in such a way that Gmail will automatically display them without prompting the user. How can I do this?
Google's Bulk Sender Guidelines say that Gmail will automatically show images for senders who have authenticated their domain:
To ensure that Gmail can identify you:
Use a consistent IP address to send bulk mail.
Keep valid reverse DNS records for the IP address(es) from which you send mail, pointing to your domain.
Use the same address in the 'From:' header on every bulk mail you send.
We also recommend publishing an SPF record, and signing with DKIM or
DomainKeys.
By authenticating, inline images you send will be shown automatically. Recipients will not need to click the "Display images
below" link.
Google offers a page to learn more about email authentication.
You can't without the user approving your imagery. It's an anti-spam/ anti-tracking technique that has to be off by default to work.
You can make Gmail display images (embedded into content) with authenticating emails sent.
You just make sure you have a correct SPF record, and 1024 bit DKIM signed the message.
Then gmail shows embedded images within content.
As of my knowledge, This is not possible. Gmaill will hide the images initially. If the Use enables (by clicking "Always display images from XXXXXX website"), then it will be available from next time onwards
You can always show images if you use Base 64. That way images are embedded as code in the code and aren't coming from anyone else's server, so there is no tracking risk. Just google how to embed an image as Base 64 and that will solve your issue completely.
Is there a way in PHP to update an email id in a mail server if we have the access details of the mail server. The requirement is as follows.
I am developing a community website which need a provision to upload photos to their photo gallery by sending an email. We planned to create email id for each user so that they could send emails with photo attachments to that id. A cron job will search for emails inside those id's and if it finds a mail with attachment, uploads the file to the server and subject of the email will be considered as the photo caption.
But it has a security loophole such that anyone who knows the email id can send an email and add photo to others account. We are planning to have a security code in their id which can be modified by user if required.
eg. name.XXXX#domain.com where XXXX is a four digit secret code. THe user can change that code whenever required. i.e. the email id can be name.1234#domain.com or name.3452#domain.com according to the user's wish to maintain privacy. So is there a way to edit the email id using PHP functions.
Creating email accounts and/or aliases would certainly be possible with PHP, but it would depend so much on your server setup.
Another route to consider would be to not have any real email boxes, but to instead have all email delivered to a catch-all account and have your cron script search through that one mailbox and compare all recipient addresses against a database, then you don't have to worry about actually creating real email users on the server.
Additionally, in terms of improving security, you could have each user authenticate which sender email addresses are allowed to send emails with photo attachments. It's still not bullet-proof, because sender addresses can be spoofed, but it's an extra step in the right direction.
Does anyone have any experience developing a way to allow users to upload photographs (and possibly video) to a website to be stored in a database from mobile devices? We will be running our system on a UNIX platform and most of the system logic is written in PHP and data is stored in a MySQL database.
Members will be given an email address which they will send attachments to. When a new member joins a new email address will be created with the users unique username.
Attached images, video or audio will be parsed, stored on the server and a record of the image etc added to the database.
Is it possible to provide a way to send photos by text message / multimedia message
What about iPhone, eyefi cards etc would these send photos using email that we could parse?
cheers
The easiest way to do this is to run a cron task that connects to the POP/IMAP account, grabs all the emails and processes through them.
There are probably several libraries to help you out with this but if you want to write your own the basic steps are:
1) Go out, get the email
2) Find the attachments
(You are going to want to look up 'getting attachments from emails through PHP')
3) Find any Body information you actually want to keep (Descriptions/etc)
4) Write it to the Database
About iPhone emails: All emails are created equal because it is a pretty open format, except for some proprietary products. I'm guessing that the iPhone will send an attachment similar to any other email client.
The MMS side I can't help you with.