Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 24 Apr 2015, 05:18
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Email to post

Hello,

I would love to have someone be able to send an email to an address that I assign.

When the email is received, a post is created in a thread I designate.

Is that possible?
Reply With Quote
  #2  
Old 09 May 2015, 19:45
QSTR QSTR is offline
 
Join Date: Nov 2010
Yes it is.

PHP with pop3/imap client for the e-mail account + vB cron job + datamanager.

--------------- Added 09 May 2015 at 20:53 ---------------

Setup email account.
Set user/forum/thread ids.

Later put the code into some file - lets call it 'email2post.php', upload to the main vB directory.
When all will be done, send a test email to your mailbox and run the script from a browser.

I tested it under vB 4.2.2.

Treat this script as example, fix it as you need. Do not use it in public,


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by QSTR; 09 May 2015 at 21:06.
Reply With Quote
  #3  
Old 12 May 2015, 17:40
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Awesome, sorry I'm so late on this but Thank you very much.

I will try this as soon as I can
Reply With Quote
  #4  
Old 17 May 2015, 14:59
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Sorry to bother you but.

I finally had a chance to test this.
When I run the file manually the data shows up in the web browser and the email deletes from the server as expected but the data does not get posted to the forum/thread as hoped.

I put in the userid, the threadid and the forumid it just does not post.

No errors BTW
Any ideas?
Reply With Quote
  #5  
Old 17 May 2015, 16:05
QSTR QSTR is offline
 
Join Date: Nov 2010
Hey,

No problem.
Did you get any post ID?

shot1.jpg
Reply With Quote
  #6  
Old 17 May 2015, 18:54
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Yes, I got a post ID

This is the output when running the php file

1.

Test1
Test2
Test3

post id: 3420

But it is not appearing in the forum


--------------- Added 17 May 2015 at 18:56 ---------------

Interestingly I thought it would show the subject title as well as Body but I can work with this.

Thank you very much
Reply With Quote
  #7  
Old 17 May 2015, 19:10
QSTR QSTR is offline
 
Join Date: Nov 2010
Hmm.
Weird. You got post ID so... whole vB mechanism is working.
I did couple tests on vB 4.2.2 and it worked like a charm.

Please check your IDs twice.
I will think about it.
Reply With Quote
  #8  
Old 17 May 2015, 19:27
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Originally Posted by QSTR View Post
Hmm.
Weird. You got post ID so... whole vB mechanism is working.
I did couple tests on vB 4.2.2 and it worked like a charm.

Please check your IDs twice.
I will think about it.
Ugh, You were right, I typed to fast and goofed on the ThreadID

It's working perfectly

You rock

thank you very much
Reply With Quote
  #9  
Old 17 May 2015, 19:49
QSTR QSTR is offline
 
Join Date: Nov 2010
Hehe. Enjoy!

Here is the version with mail subject to post title.
No subject, no title.

Should work for iso-8859-1 etc.
For UTF-8 you will have to make some tweaks.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #10  
Old 18 May 2015, 06:14
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Sweet, thanks again and thanks for the updated code. Awesome!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:36.

Layout Options | Width: Wide Color: