| 1 | package Paubox_Email_SDK::Message; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | our $VERSION = '1.2'; | ||
| 7 | |||
| 8 | # constructor | ||
| 9 | sub new { | ||
| 10 | |||
| 11 | # the package name 'Message' is in the default array @_ | ||
| 12 | # shift will take package name 'message' and assign it to variable 'class' | ||
| 13 | my $class = shift; | ||
| 14 | |||
| 15 | my $self = bless { | ||
| 16 | 'from' => '', | ||
| 17 | 'replyTo' => '', | ||
| 18 | 'to' => [], | ||
| 19 | 'cc' => [], | ||
| 20 | 'bcc' => [], | ||
| 21 | 'subject' => '', | ||
| 22 | 'allowNonTLS' => '' || 0, | ||
| 23 | 'forceSecureNotification' => '', | ||
| 24 | 'text_content' => '', | ||
| 25 | 'html_content' => '', | ||
| 26 | 'attachments' => [], | ||
| 27 | @_ }, $class; | ||
| 28 | |||
| 29 | # returning object from constructor | ||
| 30 | return $self; | ||
| 31 | } | ||
| 32 | |||
| 33 | 1; |