Thank you Massimo for your help. Now I get it working until I tried to
also use the bcc option.
I´m getting this ticket:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
Traceback (most recent call last):
File "gluon/restricted.py", line 188, in restricted
exec ccode in environment
File "controllers/order.py", line 828, in <module>
File "gluon/globals.py", line 96, in <lambda>
self._caller = lambda f: f()
File "gluon/tools.py", line 2247, in f
return action(*a, **b)
File "controllers/order.py", line 373, in manage
mail.send(to = email_receivers, cc = cc_receivers,
bcc=bcc_receiver, subject = subject, message = message)
File "gluon/tools.py", line 314, in send
raise Exception('Target receiver address not specified')
Exception: Target receiver address not specified
This works:
mail.send(to = email_receivers, cc = cc_receivers, subject = subject,
message = message)
but adding bcc like this:
mail.send(to = email_receivers, cc = cc_receivers, bcc=bcc_receiver,
subject = subject, message = message)
doesn´t work. bcc_receiver contains one address
Kenneth
On Sep 28, 4:31 pm, mdipierro <[email protected]> wrote:
> mail_receivers = ['[email protected]','[email protected]']
>
> On Sep 28, 7:52 am, Kenneth <[email protected]> wrote:
>
> > But how should that list look like.
>
> > mail_receivers = '[email protected], [email protected]' does not work,
> > it only sends that mail to the first receivers.
>
> > Kenneth
>
> > On Sep 28, 3:50 pm, mdipierro <[email protected]> wrote:
>
> > > exactely like you said:
>
> > > def send(
> > > self,
> > > to,
> > > subject='None',
> > > message='None',
> > > attachments=None,
> > > cc=None,
> > > bcc=None,
> > > reply_to=None,
> > > encoding='utf-8',
> > > ):
>
> > > to, cc and bcc can be lists of addresses.
>
> > > On Sep 28, 7:11 am, Kenneth <[email protected]> wrote:
>
> > > > Hello,
>
> > > > I can´t get the mail.send to send mails the wat I like.
>
> > > > I´d like to do it like this mail.send(to=mail_receivers,
> > > > cc=cc_receivers, subject='Test subject', message='Test message')
>
> > > > mail_receivers and cc_receivers would contain 1-5 e-mailaddresses? How
> > > > do I construct those variables.
>
> > > > Kenneth
>
>