Re: Is there a way to Send attachments with email using pgmail postgreSQl?

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: nidhi raina <nidhiraina(dot)12(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Is there a way to Send attachments with email using pgmail postgreSQl?
Date: 2016-12-19 19:50:04
Message-ID: 304F91B4-CBCC-44D6-9BDA-44ED9B852B64@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> On 19 Dec 2016, at 18:55, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>
> On 12/15/2016 10:07 PM, nidhi raina wrote:
>> Dear Sir/Mam,
>>
>> I am also trying to send emails with attachments.please help me out with
>
> If as your subject suggests you are using this:
>
> https://github.com/captbrando/pgMail
>
> then it is not possible to send attachments:
>
> "Essentially, pgMail is simply a stored function written in TCL
> which takes 4 arguments of type 'text' (Who is it from, who is it
> to, subject, and body of message), contacts the email server via
> TCL sockets, and transmits your email (Now UTF-8 Compatible!).
> "

Not even when you create the message with the correct MIME-headers and base64-encode your attachment within the correct MIME-section? That's a fair amount of code to write, but a stored procedure in, say TCL, should be able to handle that. Or am I missing something?

Whether it's a good idea to let the database encode attachments and send e-mails is a different matter, but if it isn't doing much beside that - well, why not?

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Venkata B Nagothi 2016-12-20 01:03:12 Re: Postgres 9.6 Streaming Replication on Solaris 10
Previous Message John R Pierce 2016-12-19 19:40:47 Re: Re: Re: [GENERAL] PostgreSQL mirroring from RPM install to Source install