'queue' => $queue,
'custnum' => $custnum,
'svcnum' => $session->{'svcnum'},
- map { $_ => $p->{$_} } qw( requestor cc subject message )
+ map { $_ => $p->{$_} } qw( requestor cc subject message mime_type )
);
if ( ref($err_or_ticket) ) {
Ticket message
+=item mime_type
+
+MIME type to use for message. Defaults to text/plain. Specifying text/html
+can be useful to use HTML markup in message.
+
=item custnum
Customer number (see L<FS::cust_main>) to associate with ticket.
my $mimeobj = MIME::Entity->build(
'Data' => $param{'message'},
- 'Type' => 'text/plain',
+ 'Type' => ( $param{'mime_type'} || 'text/plain' ),
);
my %ticket = (
ticket_params.addElement( "subject" );
ticket_params.addElement( "Houston, we have a problem." );
ticket_params.addElement( "message" );
- ticket_params.addElement( "The Oscillation Overthurster has gone out of alignment!\n\nIt needs to be fixed immediately! http://linktest.freeside.biz/hi" );
+ ticket_params.addElement( "The Oscillation Overthurster has gone out of alignment!<br><br>It needs to be fixed immediately! <A HREF=\"http://linktest.freeside.biz/hi\">link test</A>" );
+ ticket_params.addElement( "mime_type" );
+ ticket_params.addElement( "text/html" );
HashMap ticket_result = client.execute( "create_ticket", ticket_params);
'requestor' => 'harveylala@example.com',
'cc' => 'chiquitabanana@example.com',
'subject' => 'Chiquita keeps sitting on me',
- 'message' => "Isn't there something you can do about this?\n\nShe keeps waking me up! http://linktest.freeside.biz/hi",
+ 'message' => 'Is there something you can do about this?<BR><BR>She keeps waking me up! <A HREF="http://linktest.freeside.biz/hi">link test</A>',
+ 'mime_type' => 'text/html',
);
die $t_result->{'error'} if $t_result->{'error'};