Welcome Guest, Not a member yet? Register   Sign In
Save email to MySQL
#1

Hi

I am beginner at CodeIgniter
What should be correct approach to save email to db,
to save attachments to disk
and to save links to these attachments?

I could not find any discussions.
Reply
#2

(This post was last modified: 03-13-2015, 12:45 PM by comp_nerd26. Edit Reason: extra )

hi

do you mean save a contact form to database?

can you confirm what you are trying to do and i will try and help you?
Reply
#3

(03-13-2015, 12:44 PM)comp_nerd26 Wrote: hi

do you mean save a contact form to database?

can you confirm what you are trying to do and i will try and help you?

Hi!!!

Thank you for reply.

The problem is complicated enough...

1. I need to save email letters to dbase (id, from_address, message_header, mail_content, attachment_url, upload_date)
and to save attachments to server disk.

2. Attachments should be saved to new directory every month. I.e:

/files/
2015.03/
2015.04/
....
2016.03/
....
....

3. And if attachment is a picture it should be resized.

I have found this topic: http://forum.codeigniter.com/thread-661....ight=email
Just study it. It's not quite what i need. But it can help...
Reply
#4

You need a Email parser like the following:

https://code.google.com/p/php-mime-mail-parser/
https://github.com/plancake/official-lib...ail-parser
https://github.com/eXorus/php-mime-mail-parser

Then you can extract the needed parts of an email and save it to your database, etc.

Reply
#5

There are also the PHP imap functions which can help with all of this.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB