.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "VUser::Google::EmailSettings 3pm" .TH VUser::Google::EmailSettings 3pm "2011-05-30" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" VUser::Google::ProvisioningAPI::EmailSettings \- Manage user email settings in Google Apps for Your Domain. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use VUser::Google::ApiProtocol::V2_0; \& use VUser::Google::EmailSettings::V2_0; \& \& ## Create a new connection \& my $google = VUser::Google::ApiProtocol::V2_0\->new( \& domain => \*(Aqyour.google\-apps\-domain.com\*(Aq, \& admin => \*(Aqadmin_user\*(Aq, \& password => \*(Aqadmin_user password\*(Aq, \& ); \& \& my $settings = VUser::Google::EmailSettings::V2_0\->new( \& google => $google, \& user => \*(Aqusername\*(Aq, \& ); \& \& ## Create a new label \& $settings\->CreateLabel(\*(Aqlabel\*(Aq => \*(AqnewLabel\*(Aq); \& \& ## Create a new filter \& $settings\->CreateFilter( \& \*(Aqfrom\*(Aq => \*(Aqsender@example.com\*(Aq, \& \*(Aqlabel\*(Aq => \*(AqnewLabel\*(Aq, \& \*(AqshouldArchive\*(Aq => 1, \& ); \& \& ## Create a new send\-as alias \& $settings\->CreateSendAsAlias( \& \*(Aqname\*(Aq => \*(AqTech Support\*(Aq, \& \*(Aqaddress\*(Aq => \*(Aqsupport@example.com\*(Aq, \& ); \& \& ## Update the user\*(Aqs web clip setting \& $settings\->UpdateWebClip(\*(Aqenable\*(Aq => 0); # Turn off \& $settings\->UpdateWebClip(\*(Aqenable\*(Aq => 1); # Turn on \& \& ## Update forwarding \& $settings\->UpdateForwarding( \& \*(Aqenable\*(Aq => 1, \& \*(AqforwardTo\*(Aq => \*(Aqsomeoneelse@example.com\*(Aq, \& \*(Aqaction\*(Aq => \*(AqKEEP\*(Aq, \& ); \& \& ## Update POP3 settings \& $settings\->UpdatePOP( \& \*(Aqenable\*(Aq => 1, \& \*(AqenableFor\*(Aq => \*(AqMAIL_FROM_NOW_ON\*(Aq, \& \*(Aqaction\*(Aq => \*(AqKEEP\*(Aq, \& ); \& \& ## Update IMAP settings \& $settings\->UpdateIMAP(\*(Aqenable\*(Aq => 1); \& \& ## Update user\*(Aqs vacation message \& $settings\->UpdateVacationResponder( \& \*(Aqenable\*(Aq => 1, \& \*(Aqsubject\*(Aq => "I\*(Aqm not here right now", \& \*(Aqmessage\*(Aq => "I\*(Aqve lost my mind and have gone to search for it.", \& \*(AqcontactsOnly\*(Aq => 1, \& ); \& \& ## Update the user\*(Aqs signature \& $settings\->UpdateSignature( \& \*(Aqsignature\*(Aq => \*(AqJoe Cool \&555\-5555\*(Aq \& ); \& $settings\->UpdateSignature(\*(Aqsignature\*(Aq => \*(Aq\*(Aq); # clear sig \& \& ## Update the display language \& $settings\->UpdateLanguage(\*(Aqlanguage\*(Aq => \*(Aqen\-US\*(Aq); \& \& ## Update the user\*(Aqs general settings \& $settings\->UpdateGeneral(\*(AqpageSize\*(Aq => 50); \& \& # You can set more than one at a time \& $settings\->UpdateGeneral( \& \*(Aqarrows\*(Aq => 1, \& \*(Aqshortcuts\*(Aq => 0, \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is the base class for the Email Settings \s-1API\s0. It is not meant to be used directly. Instead see the sub class for each version of the email settings \s-1API\s0. .SH "MEMBERS" .IX Header "MEMBERS" .SS "Read-write members" .IX Subsection "Read-write members" .IP "base_url" 4 .IX Item "base_url" The \f(CW\*(C`base_url\*(C'\fR for the Email settings \s-1API\s0 calls. For example, \&\fIhttps://apps\-apis.google.com/a/feeds/emailsettings/2.0/\fR. .IP "debug" 4 .IX Item "debug" Turn on debugging output. .IP "google" 4 .IX Item "google" A VUser::Google::ApiProtocol object. .IP "user" 4 .IX Item "user" The user name of user to modify. .SH "METHODS" .IX Header "METHODS" All of the calls to the Google \s-1API\s0 take a hash with the options specified by Google. The keys for the hash and what is expected are listed below. Specific versions my use different keys. In general, the keys will match the names of the attributes in the \s-1API\s0 docs. See the docs for the \&\s-1API\s0 version you are using for any differences. .PP \&\fBNote:\fR Values that are \*(L"true\*(R"/\*(L"false\*(R" are set using Perl values for true and false, i.e. zero for false and anything else for true. .SS "new (%defaults)" .IX Subsection "new (%defaults)" Create a new EmailSettings object. Any read-write member may be set in the call to \f(CW\*(C`new()\*(C'\fR. .SS "dprint ($message)" .IX Subsection "dprint ($message)" Prints \f(CW$message\fR to \s-1STDERR\s0 if \f(CW\*(C`debug\*(C'\fR is set to a true value. .SS "CreateLabel (%options)" .IX Subsection "CreateLabel (%options)" Create a new label. .IP "label" 4 .IX Item "label" The label to create in Google Mail. .SS "CreateFilter" .IX Subsection "CreateFilter" Create a new mail filter. .IP "from" 4 .IX Item "from" The email must come from this address in order to be filtered. .IP "to" 4 .IX Item "to" The email must be sent to this address in order to be filtered. .IP "subject" 4 .IX Item "subject" A string the email must have in its subject line to be filtered. .IP "hasTheWord" 4 .IX Item "hasTheWord" A string the email can have anywhere in it's subject or body. .IP "doesNotHaveTheWord" 4 .IX Item "doesNotHaveTheWord" A string that the email cannot have anywhere in its subject or body. .IP "hasAttachment" 4 .IX Item "hasAttachment" A boolean representing whether or not the email contains an attachment. .IP "label" 4 .IX Item "label" The name of the label to apply if a message matches the specified filter criteria. .IP "shouldMarkAsRead" 4 .IX Item "shouldMarkAsRead" Whether to automatically mark the message as read if it matches the specified filter criteria .IP "shouldArchive" 4 .IX Item "shouldArchive" Whether to automatically move the message to \*(L"Archived\*(R" state if it matches the specified filter criteria. .SS "CreateSendAsAlias" .IX Subsection "CreateSendAsAlias" Create a gmail \*(L"Send-as alias.\*(R" .IP "name" 4 .IX Item "name" The name that will appear in the \*(L"From\*(R" field for this user. .IP "address" 4 .IX Item "address" The email address that appears as the origination address for emails sent by this user. .IP "replyTo" 4 .IX Item "replyTo" \&\fI(Optional)\fR If set, this address will be included as the reply-to address in emails sent using the alias. .IP "makeDefault" 4 .IX Item "makeDefault" \&\fI(Optional)\fR If set to true, this alias will be become the new default alias to send-as for this user. .SS "UpdateWebClip" .IX Subsection "UpdateWebClip" Update the user's \*(L"web clip\*(R" setting. .IP "enable" 4 .IX Item "enable" Whether to enable showing Web clips. .SS "UpdateForwarding" .IX Subsection "UpdateForwarding" Update gmail forwarding settings. .IP "enable" 4 .IX Item "enable" Whether to enable forwarding of incoming mail. .IP "forwardTo" 4 .IX Item "forwardTo" The email will be forwarded to this address. .IP "action" 4 .IX Item "action" What Google Mail should do with its copy of the email after forwarding it on. .Sp \&\fBAllowed values:\fR \*(L"\s-1KEEP\s0\*(R" (in inbox), \*(L"\s-1ARCHIVE\s0\*(R", or \*(L"\s-1DELETE\s0\*(R" (send to trash) .SS "UpdatePOP" .IX Subsection "UpdatePOP" Update the user's \s-1POP3\s0 settings. .IP "enable" 4 .IX Item "enable" Whether to enable \s-1POP3\s0 access. .IP "enableFor" 4 .IX Item "enableFor" Whether to enable \s-1POP3\s0 for all mail, or mail from now on. .Sp \&\fBAllowed values:\fR \*(L"\s-1ALL_MAIL\s0\*(R", \*(L"\s-1MAIL_FROM_NOW_ON\s0\*(R" .IP "action" 4 .IX Item "action" What Google Mail should do with its copy of the email after it is retrieved using \s-1POP\s0. .Sp \&\fBAllowed values:\fR \*(L"\s-1KEEP\s0\*(R" (in inbox), \*(L"\s-1ARCHIVE\s0\*(R", or \*(L"\s-1DELETE\s0\*(R" (send to trash) .SS "UpdateIMAP" .IX Subsection "UpdateIMAP" Update the user's \s-1IMAP\s0 settings. .IP "enable" 4 .IX Item "enable" Whether to enable \s-1IMAP\s0 access. .SS "UpdateVactionResponder" .IX Subsection "UpdateVactionResponder" Update the user's vacation auto-responder. .IP "enable" 4 .IX Item "enable" Whether to enable the vacation responder. .IP "subject" 4 .IX Item "subject" The subject line of the vacation responder autoresponse. .IP "message" 4 .IX Item "message" The message body of the vacation responder autoresponse. .IP "contactsOnly" 4 .IX Item "contactsOnly" Whether to only send the autoresponse to known contacts. .SS "UpdateSignature" .IX Subsection "UpdateSignature" Update the user's signature. .IP "signature" 4 .IX Item "signature" The signature to be appended to outgoing messages. Set the signature to \&\f(CW\*(Aq\*(Aq\fR (the empty string) to clear the signature. .SS "UpdateLanguage" .IX Subsection "UpdateLanguage" Update the display language. .IP "language" 4 .IX Item "language" Google Mail's display language. This should be a language tag defined in \&\s-1RFC\s0 3066. See http://code.google.com/apis/apps/email_settings/developers_guide_protocol.html#GA_email_language_tags for a list of supported languages. .SS "UpdateGeneral" .IX Subsection "UpdateGeneral" Update the user's general settings. .IP "pageSize" 4 .IX Item "pageSize" The number of conversations to be shown per page. .Sp \&\fBAllowed values:\fR 25, 50, 100 .IP "shortcuts" 4 .IX Item "shortcuts" Whether to enable keyboard shortcuts. .IP "arrows" 4 .IX Item "arrows" Whether to display arrow-shaped personal indicators next to emails that were sent specifically to the user. .IP "snippets" 4 .IX Item "snippets" Whether to display snippets of messages in the inbox and when searching. .IP "unicode" 4 .IX Item "unicode" Whether to use \s-1UTF\-8\s0 (unicode) encoding for all outgoing messages, instead of the default text encoding. .SH "SEE ALSO" .IX Header "SEE ALSO" VUser::Google::EmailSettings::V2_0, VUser::Google::ApiProtocol .IP "Google Email Settings \s-1API\s0" 4 .IX Item "Google Email Settings API" http://code.google.com/apis/apps/email_settings/developers_guide_protocol.html .SH "BUGS" .IX Header "BUGS" Report bugs at http://code.google.com/p/vuser/issues/list. .SH "AUTHOR" .IX Header "AUTHOR" Randy Smith, perlstalker at vuser dot net .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available. .PP If you make useful modification, kindly consider emailing then to me for inclusion in a future version of this module.