Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

DBMail insert email via SQL?

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


greminn at gmail

Jun 21, 2012, 10:47 PM

Post #1 of 7 (404 views)
Permalink
DBMail insert email via SQL?

Hi There,

We have a CRM package that emails on behalf of our users, who are using DBMail (3.x) and IMAP for their email.

I know its SQL so i know its techincally possible, but is there a correct way todo this? if so, pointers would be really appreciated thanks!

Thanks!

Simon

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


mysql.jorge at decimal

Jun 22, 2012, 1:14 AM

Post #2 of 7 (389 views)
Permalink
Re: DBMail insert email via SQL? [In reply to]

> We have a CRM package that emails on behalf of our users, who are using
> DBMail (3.x) and IMAP for their email.
>
> I know its SQL so i know its techincally possible, but is there a
> correct way todo this? if so, pointers would be really appreciated
> thanks!

Why not just SMTP it?

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Jun 22, 2012, 3:19 AM

Post #3 of 7 (388 views)
Permalink
Re: DBMail insert email via SQL? [In reply to]

Am 22.06.2012 07:47, schrieb Simon:
> Hi There,
>
> We have a CRM package that emails on behalf of our users, who are using DBMail (3.x) and IMAP for their email.
> I know its SQL so i know its techincally possible, but is there a correct way todo this? if so, pointers would be really appreciated thanks!

do not do this

you would need to behave EXACTLY like internel dbmail-code
and be aware of any internal changes / bugfixes and so on

this is why SMTP as generic protocol exists
the MTP is for "Mail Transport Protocol" and the S for "Simple"
Attachments: signature.asc (0.26 KB)


greminn at gmail

Jun 22, 2012, 1:17 PM

Post #4 of 7 (387 views)
Permalink
Re: DBMail insert email via SQL? [In reply to]

On 22/06/2012, at 10:19 PM, Reindl Harald wrote:

> Am 22.06.2012 07:47, schrieb Simon:
>> Hi There,
>>
>> We have a CRM package that emails on behalf of our users, who are using DBMail (3.x) and IMAP for their email.
>> I know its SQL so i know its techincally possible, but is there a correct way todo this? if so, pointers would be really appreciated thanks!
>
> do not do this
>
> you would need to behave EXACTLY like internel dbmail-code
> and be aware of any internal changes / bugfixes and so on
>
> this is why SMTP as generic protocol exists
> the MTP is for "Mail Transport Protocol" and the S for "Simple"

Thanks for the reply.. sorry i should have been a little bit more in-depth with what we want todo. we would like the CRM to add the outgoing email to the Sent Items folder for the given user.. but as you note above, i will be looking todo this outside of SQL.

Thanks

Simon
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Jun 22, 2012, 1:20 PM

Post #5 of 7 (391 views)
Permalink
Re: DBMail insert email via SQL? [In reply to]

Am 22.06.2012 22:17, schrieb Simon:
> On 22/06/2012, at 10:19 PM, Reindl Harald wrote:
>> do not do this
>>
>> you would need to behave EXACTLY like internel dbmail-code
>> and be aware of any internal changes / bugfixes and so on
>>
>> this is why SMTP as generic protocol exists
>> the MTP is for "Mail Transport Protocol" and the S for "Simple"
>
> Thanks for the reply.. sorry i should have been a little bit more in-depth with what we want todo. we would like the CRM to add the outgoing email to the Sent Items folder for the given user.. but as you note above, i will be looking todo this outside of SQL.

then IMAp is the way to go!

each imap-mail-client does excatly the same

* sending the message per SMTP
* after SMTP responses with OK store the message via IMAp in "sent"

do not RAW edit the storage a long protocols are existing

the reason is always: stnadrad-ways have proper error handling
and your implementation does not depend on a single software
and their current low-level implementation which may change
Attachments: signature.asc (0.26 KB)


cloos at jhcloos

Jun 22, 2012, 2:25 PM

Post #6 of 7 (387 views)
Permalink
Re: DBMail insert email via SQL? [In reply to]

I haven't looked to see whether this changed at all with dbmail3, but
with dbmail2, at least, you can directly use dbmail-smtp to inject mail.

Call it like:

dbmail-smtp -u $USER -M $MAILBOX <$MESSAGE

to insert the mail stored in file $MESSAGE into ${USER}'s mailbox $MAILBOX.

Cf dbmail-smtp --help for the details on its argument syntax.

-JimC
--
James Cloos <cloos [at] jhcloos> OpenPGP: 1024D/ED7DAEA6
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


paul at nfg

Jun 24, 2012, 3:33 AM

Post #7 of 7 (382 views)
Permalink
Re: DBMail insert email via SQL? [In reply to]

On 06/22/2012 11:25 PM, James Cloos wrote:
> I haven't looked to see whether this changed at all with dbmail3, but
> with dbmail2, at least, you can directly use dbmail-smtp to inject mail.
>
> Call it like:
>
> dbmail-smtp -u $USER -M $MAILBOX <$MESSAGE
>
> to insert the mail stored in file $MESSAGE into ${USER}'s mailbox $MAILBOX.


Indeed. For dbmail3 use: dbmail-deliver ...

Just a name-change, same arguments. In fact I always symlink dbmail-smtp
to dbmail-deliver to provide backward compatibility.

--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.