Advertisement
Guest User

Untitled

a guest
Jun 21st, 2015
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. #!perl
  2. use strict;
  3.  
  4. use Email::Send;
  5. use Email::Send::Gmail;
  6. use Email::Simple::Creator;
  7. use Data::GUID;
  8.  
  9. my $guid = Data::GUID->new;
  10. my $icalUID = $guid->as_string;
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. my $bodyText = <<"VCALTEXT";
  18. BEGIN:VCALENDAR
  19. PRODID:-//ACME/DesktopCalendar//EN
  20. METHOD:REQUEST
  21. VERSION:2.0
  22. BEGIN:VEVENT
  23. ORGANIZER:mailto:bring1\@alumni.lsu.edu
  24. ATTENDEE;ROLE=CHAIR;ATTSTAT=ACCEPTED:mailto:bring1\@alumni.lsu.edu
  25. ATTENDEE;RSVP=YES:mailto:bring\@belltec.com
  26. DTSTAMP:20150518T190000Z
  27. DTSTART:20150520T210000Z
  28. DTEND:20150520T230000Z
  29. SUMMARY:Phone Conference
  30. DESCRIPTION:Please review the attached document.
  31. UID:$icalUID
  32. ATTACH:ftp://ftp.bar.com/pub/docs/foo.doc
  33. STATUS:CONFIRMED
  34. END:VEVENT
  35. END:VCALENDAR
  36. VCALTEXT
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. my $email = Email::Simple->create(
  44. header => [
  45. From => 'ovhrecon@gmail.com',
  46. #To => 'bring@belltec.com',
  47. To => 'bring@belltec.com',
  48. #Cc => 'bring@belltec.com',
  49. Subject => "Phone Conference",
  50. ],
  51. body => $bodyText,
  52. );
  53. $email->header_set( 'Content-Type' => 'text/calendar;' );
  54. $email->header_set( 'method' => 'request;' );
  55.  
  56. my $sender = Email::Send->new(
  57. { mailer => 'Gmail',
  58. debug => 0,
  59. mailer_args => [
  60. #username => 'bkrspam2012@gmail.com',
  61. #password => 'p3rfection',
  62. username => 'ovhrecon@gmail.com',
  63. # Obfuscated by www.perlobfuscator.com
  64. password => "\x32\x32\x77\x68\x6F\x64\x61\x74\x24\x25",
  65. ]
  66. }
  67. );
  68. eval { $sender->send($email) };
  69. if ($@) {
  70. die "Error sending email: $@";
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement