I want to different messages sent to two different addresses.
On Mon, Sep 28, 2009 at 6:15 AM, Christopher Johnston
<cjohnstonwork(a)gmail.com> wrote:
Why not just create an email alias and put the two smtp addresses to
the
alias?
-Chris
On Tue, Sep 22, 2009 at 1:41 PM, Paul Company <pjcster(a)gmail.com> wrote:
>
> I'm trying to modify cobbler so it sends out two emails after a
> successful install.
>
> Here's what I did to try to accomplish this - but it didn't work.
> I get the first (default) email, but I don't get the second email.
>
> Any ideas.
>
> # vi /etc/cobbler/reporting/build_my_report_email.template
> From: $from_addr
> To: pcompany(a)mydomain.com
> Subject: "Installed bar.baz.mydomain.com"
>
> USER=($user)
> NEWHOST=[$system_name]
> :wq!
>
> # vi
> /usr/lib/python2.4/site-packages/cobbler/modules/install_post_report.py
> ## I added the following to the bottom of this file, before the "return 0"
> input_template =
> open("/etc/cobbler/reporting/build_my_report_email.template")
> input_data = input_template.read()
> input_template.close()
> message = templar.Templar().render(input_data, None, None)
> server_handle = smtplib.SMTP(smtp_server)
> server_handle.sendmail(from_addr, "pcompany(a)mydomain.com", message)
> server_handle.quit()
> :wq!
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler