FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


email to database





medesignz
How is it possible that I can support email picture submissions to my database?
pollux1er
I think you don not explain well your problem. Be more explicit. What do you want to do exactly
medesignz
pollux1er wrote:
I think you don not explain well your problem. Be more explicit. What do you want to do exactly


Sorry, it was a little late when I decided I wanted such a function for a website I am developing.

Basically, I want people to be able to send pictures to my website using email.

For example, Jayne took a picture at a night out, thinks it will look good on the website so decides to send it to the site. Instead of sending it to the admin for self uploading, I'd prefer it for Jayne to send it to a designated email pictures-users@webdomain.com and it automatically gets sent to the database and uploaded to the gallery...

Does that make sense?
badai
make sense and possible, just how you can post on webpress using e-mail. now instead of text, you use blob.
jmlworld
medesignz wrote:
pollux1er wrote:
I think you don not explain well your problem. Be more explicit. What do you want to do exactly


Sorry, it was a little late when I decided I wanted such a function for a website I am developing.

Basically, I want people to be able to send pictures to my website using email.

For example, Jayne took a picture at a night out, thinks it will look good on the website so decides to send it to the site. Instead of sending it to the admin for self uploading, I'd prefer it for Jayne to send it to a designated email pictures-users@webdomain.com and it automatically gets sent to the database and uploaded to the gallery...

Does that make sense?


WordPress has a functionality called post via e-mail. This is how WordPress describes this functionality:

Quote:
To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it’s a good idea to keep this address very secret. Here are three random strings you could use: s4YTfaYI, 4xJrg3SM, lvdEyjba.


So you can create a random, but hard to guess, email address via your host's control panel. Something like s4ytfa.4xgrg378l@yourdomain.com is hard to be guessed by spammers and hackers, but if you tell it to Jayne to send the photos via that email, the pictures will be published directly on your website, with the email subject as the post title, email content as the description and the attachments as the photos.

Once you install WordPress, go to http://yourdomain.com/wp-admin/options-writing.php and scroll down the page until you reach where it says "Post via e-mail", fill the fields below that headline and save your settings.

Test if it works, and then, tell Jayne to send the pictures via the email. WordPress will handle the job, while you're sleeping.

Isn't it awesome?
medesignz
Thanks jmlworld,

I have been testing on my wordpress blog for the past day actually, and set up as should be, but when I go to activate the test posts I have sent (http://www.domain.com/blog-dir/wp-mail.php) I get an error page stating "POP3 pass: Authentication failed [-ERR Authentication failed.]"

Any ideas?
jmlworld
medesignz wrote:
Thanks jmlworld,

I have been testing on my wordpress blog for the past day actually, and set up as should be, but when I go to activate the test posts I have sent (http://www.domain.com/blog-dir/wp-mail.php) I get an error page stating "POP3 pass: Authentication failed [-ERR Authentication failed.]"

Any ideas?


I didn't understand this. Did you receive the error when you saved the 'Post via Email' settings page or when you visited directly the address http://www.domain.com/blog-dir/wp-mail.php?

Here is the a guide from the WordPress Codex anyway: http://codex.wordpress.org/Post_to_your_blog_using_email
macky
wow i got some ideas. thanks... i will try to do this manually if i succeed i will post here how to do it..
medesignz
jmlworld wrote:


I didn't understand this. Did you receive the error when you saved the 'Post via Email' settings page or when you visited directly the address http://www.domain.com/blog-dir/wp-mail.php?

Here is the a guide from the WordPress Codex anyway: http://codex.wordpress.org/Post_to_your_blog_using_email


When visiting the page immediately after I send an email to the address.

I read the codex before submitting the question here, and the problem doesn't seem to be on the Troubleshooting section...
jmlworld
medesignz wrote:
jmlworld wrote:


I didn't understand this. Did you receive the error when you saved the 'Post via Email' settings page or when you visited directly the address http://www.domain.com/blog-dir/wp-mail.php?

Here is the a guide from the WordPress Codex anyway: http://codex.wordpress.org/Post_to_your_blog_using_email


When visiting the page immediately after I send an email to the address.

I read the codex before submitting the question here, and the problem doesn't seem to be on the Troubleshooting section...


The error you posted above is authentication problem. It seems that WordPress cannot connect to the POP3 server given or the email you provided is not from the same domain name as your blog or your email password is incorrect. Below I included a screenshot of this supposed to be (and look below the email for further explanation):



Some explanations:

1- Make sure that the POP3 mail server you given is correct. If you're hosted by frihost's server 3, your mail server is mail.yourdomain.frih.net. if you're using top level domain name (i.e. somedomain.com and you're on Frihost you can use mail.somedomain.com)

2- The email should be from the same domain name as your blog, so if your blog is somedomain.com, your email should be randomemail@somedomain.com.

3- Double check your password. This password is not your blog password, it's the password of the email you given WordPress to retrieve posts.

Everything else fails, contact your host and ask them if they've blocked certain functions. I didn't look it, but I think the post via email function uses PHP's curl()
medesignz
something that does not appear under your category selection was a field thats called PostViaEmail.com, which states "Your current email address to post to this site is: ya2a@postviaemail.com
If you'd like you can also generate a new email address."

Why does that show up on mine?
jmlworld
medesignz wrote:
something that does not appear under your category selection was a field thats called PostViaEmail.com, which states "Your current email address to post to this site is: ya2a@postviaemail.com
If you'd like you can also generate a new email address."

Why does that show up on mine?


I'm running the latest WordPress stable version 3.0.4 at the momend and I've been using WordPress since version 1.5 (in other words, since 2005/2006) and I swear that I didn't ever see such a field.

Can you tell me which version of WordPress are you using and where you downloaded your current WordPress install?

Do you use plugins that enhance the functionality of post via email?

Edit: you're using the PostViaEmail plugin, right? Do you see a screen like this?


??
medesignz
I am using the latest version of Wordpress, and yeah, I am using postviaemail

I have had wordpress on the site since maybe version 3, but I used an automatically update recently. Saying that I havent tried using the email system until I after I updated.

Still getting the same error
jmlworld
medesignz wrote:
I am using the latest version of Wordpress, and yeah, I am using postviaemail

I have had wordpress on the site since maybe version 3, but I used an automatically update recently. Saying that I havent tried using the email system until I after I updated.

Still getting the same error


Do you see a screen like this below the Post via email settings?


If yes, you're using the plugin PostViaEmail which generates the email ya2a[at]postviaemail.com -- disable that plugin and use the WordPress's native Post Via Email settings.

You should use an email hosted under your current domain. If your domain name is medesignz.co.uk go to your cPanel/DirectAdmin and create an email like this: r4nd0mz1873423[at]medesignz.co.uk

Then go to WordPress'es post via email settings page, which will show you a screen like this:



Now fill the fields like this:

Code:
Mail Server: mail.medesignz.co.uk
Login Name: r4nd0mz1873423[at]medesignz.co.uk
Password: your_email_password
Default Mail Category: Desired Category Name


Make sure to use difficult to guess username for the email.
medesignz
jmlworld, I have this all as you suggested, but its still not working and throwing up the same error :S
jmlworld
medesignz wrote:
jmlworld, I have this all as you suggested, but its still not working and throwing up the same error :S


Something is somehow stopping your WordPress before it gets into the email inbox to fetch the message. Probably, it's POP3 disabled. Or the mail server credentials are wrong.

Can you connect your email through Microsoft Outlook, Mozilla Thunderbird, iPhone or any other mail client out there?
medesignz
yes... i can connect via thunderbird, but i cannot connect via the blog! this is frustrating to say the least Sad
jmlworld
medesignz wrote:
yes... i can connect via thunderbird, but i cannot connect via the blog! this is frustrating to say the least Sad


May be the problem is your webhost is blocking something. You can ask them.

Also there may be a difference between the domain of the email you're trying to connect to and the domain of your blog.
Related topics
[php scripts ] phpweather&email
Critical Database Error (Or something else)
Nore: EuroDNS .be domains not free-email rec'd attached
Connecting to the database?
Need Database structure! $200 fri or more if needed
Looking for a person via his email or IP
Email service
Access DataBase using visual basic6
Changing the phpBB email greeting
Getting unread email count using PHP
Database =/
Database connection class!
Checking for values in database and displaying error page
manually input to sql database
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.