Hi ,

this is not working , i am not able to receive alerts  in having user  CC 

- name: 'MoniDashboard'
  email_configs:
  - send_resolved: true
    to: 'vinoth.sundaram@
    headers:
      subject: "{{ .CommonAnnotations.summary }}"
      to: 'vinoth.sundaram@
      CC: 'PrashantKumar.Singh1@
    require_tls: no


Thanks 
prashant 




On Friday, January 20, 2023 at 7:33:08 PM UTC+5:30 [email protected] 
wrote:
Ah, thanks for that addition. Indeed, "to" is handled in a special way 
here: 
https://github.com/prometheus/alertmanager/blob/f59460bfd4bf883ca66f4391e7094c0c1794d158/notify/email/email.go#LL230C28-L230C28

Which makes sense given that in SMTP, there's always separate "RCPT TO: 
<...>" lines (which I guess this translates into) before the body of the 
email that contains the headers.

On Fri, Jan 20, 2023 at 2:34 PM Julien Pivotto <[email protected]> 
wrote:
To send an email with a CC: in alertmanager, it is not sufficient to add a 
CC: header.

receivers:
- name: my-receiver
  email_configs:
  - to: '[email protected]'
    headers:
      subject: 'my subject'
      CC: '[email protected]'

You also need to add the CC: address to the to: field and explicitely add a 
to: field.

receivers:
- name: my-receiver
  email_configs:
  - to: '[email protected],[email protected]'
    headers:
      subject: 'my subject'
      To: '[email protected]'
      CC: '[email protected]'

To send a mail in BCC:, overwrite the To: header and add the BCC addresses 
to the to: field:

receivers:
- name: my-receiver
  email_configs:
  - to: '[email protected],[email protected]'
    headers:
      subject: 'my subject'
      To: '[email protected]'

On 20 Jan 14:28, Julius Volz wrote:
> Hi Prashant,
> 
> Looking at the email implementation in Alertmanager, "to" should be 
treated
> exactly as "cc" internally (just optionally supplied through a dedicated
> YAML field). It's just another header:
> 
https://github.com/prometheus/alertmanager/blob/f59460bfd4bf883ca66f4391e7094c0c1794d158/notify/email/email.go#L53-L70
> 
> So I would be surprised if the problem is in Alertmanager itself, rather
> than something in the email pipeline after it.
> 
> Kind regards,
> Julius
> 
> On Fri, Jan 20, 2023 at 1:38 PM Prashant Singh <[email protected]>
> wrote:
> 
> > Dear team,
> >
> > prometheus alertmanager CC is not working even as add TO_ and CC_ .
> >
> > TO:  it is working
> > CC: it is not working.
> >
> >
> > - name: 'MoniDashboard'
> >   email_configs:
> >   - send_resolved: true
> >     to: 'vinoth.sundaram
> >     headers:
> >       cc: 'PrashantKumar.Singh1'
> >     require_tls: no
> >
> > thanks
> > Prashant
> >
> > --
> > You received this message because you are subscribed to the Google 
Groups
> > "Prometheus Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
an
> > email to [email protected].
> > To view this discussion on the web visit
> > 
https://groups.google.com/d/msgid/prometheus-users/9987573c-ed69-4fb2-94aa-4c37870c540dn%40googlegroups.com
> > <
https://groups.google.com/d/msgid/prometheus-users/9987573c-ed69-4fb2-94aa-4c37870c540dn%40googlegroups.com?utm_medium=email&utm_source=footer
>
> > .
> >
> 
> 
> -- 
> Julius Volz
> PromLabs - promlabs.com
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
email to [email protected].
> To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAObpH5wv7WVme5ysp720Cj815fJdwATria-%2B0yDW0sG46_82XA%40mail.gmail.com
.

-- 
Julien Pivotto
@roidelapluie


-- 
Julius Volz
PromLabs - promlabs.com

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/d48d2742-746b-4fa0-a199-734b000e8cden%40googlegroups.com.

Reply via email to