Quick'n'dirty script to mass-mail OTRS customers

Dominik George <[email protected]> Wed, 21 May 2014 15:50:44 +0200
Newsgroups gmane.comp.otrs.user,gmane.comp.otrs.devel
Organization tarent solutions GmbH
Message-ID <1693454.tXMkf6Ttl8@dgeorg>
Hi,

we faced the need to open tickets to all of our customers in order to inform 
them about the Heartbleed bug and the necessary consequences and we wanted to 
have that mail in OTRS as proof of the communication and for tracking.

OTRS does not have an interface to send the same mail to all customers in 
seperate tickets with reasonable customer and agent info, so I hacked together 
a Python cript that uses the SOAP API to do the magic.

It does:

 * Gather information needed to create the tickets
 * Read exxceptions in the form of e-mail address endings
 * Find all customers that do not match the exceptions
 * Open tickets to all these customers, that:
   - have the correct set of agent and customer
   - are set to "pending auto close+" because we want to get rid
     of the tickets should there not be any feedback

The script has a known bug with everything else than ASCII in ticket title and 
body because Unicode in Python 2 is a PITA. I will probably fix that in the 
future or wait for patches ;).

https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=useful-scripts/useful-scripts.git;a=blob_plain;f=otrs/otrs-mailcustomers.py;hb=HEAD

Cheers,
Nik

-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-319 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
signature.asc (application/pgp-signature, 730 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQHOBAABCAA4BQJTfK80MRpodHRwczovL3d3dy5kb21pbmlrLWdlb3JnZS5kZS9n
cGctcG9saWN5LnR4dC5hc2MACgkQ1qpFbGL+SAJSwQv/TLdJSlgTGuAY0wdy+baH
f+neK2dxuc1ShLCEuIZeet9mCxPSYHtyhNz0zxUbcGmaHMDFoAs+LIe+ntShbdAi
4qko9mHYfcJoysP75usyJBTlHBZO9ZLRQMxs77VTomLZo2hdKfBs9m9uvt0dNtzx
XM73WfXbRfkAv64haK1IP0rGWJmPxm4jK9Rti/yiA+0s1aRNcKy5Xr9Qi968wNEa
s39NKDlVRm8EnIvq9nGnokJMMHIfxY3CwTlGgXRCDfRUaHHhxRlOe0DbfDwlObg9
0pnCS16/44i5MiCrJxPu+cXgRHdnSjFII9c/YodzhrmHL7CvtDRaO9kyWgGO5J2V
j2qoOjz2eF1iCASwJJf6SkJOeDUjq5DF8H9NgZBkAXV8IWr5ztbd3QeSsWMdeQM2
CvtyXjdQdiBHZ7mTTmMac7C3rfVXFIiN3Is84sQUQooBeKceBFTcXUsJoKusFXcd
dePZ9qUpiSzzf9GwvyKF9cmxS7bTwn2mfC27a5ZCxtVY
=s0rQ
-----END PGP SIGNATURE-----