VUser:...ttings(3pm)
π NAME π
VUser::Google::ProvisioningAPI::EmailSettings β manage user email settings in Google Apps for Your Domain. That's the whole vibe. It's the module that pokes at a user's mail settings and makes them do what you want. πΈ
(You'll see this page hanging out in the header as VUser:...ttings(3pm), which is just the name getting squished by the formatting, bestie, don't panic.)
β¨ SYNOPSIS β¨
okay so here's literally everything this thing can do, in one big mood board:
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 => 'your.google-apps-domain.com',
admin => 'admin_user',
password => 'admin_user password',
);
my $settings = VUser::Google::EmailSettings::V2_0->new(
google => $google,
user => 'username',
);
## Create a new label
$settings->CreateLabel('label' => 'newLabel');
## Create a new filter
$settings->CreateFilter(
'from' => 'sender@example.com',
'label' => 'newLabel',
'shouldArchive' => 1,
);
## Create a new send-as alias
$settings->CreateSendAsAlias(
'name' => 'Tech Support',
'address' => 'support@example.com',
);
## Update the user's web clip setting
$settings->UpdateWebClip('enable' => 0); # Turn off
$settings->UpdateWebClip('enable' => 1); # Turn on
## Update forwarding
$settings->UpdateForwarding(
'enable' => 1,
'forwardTo' => 'someoneelse@example.com',
'action' => 'KEEP',
);
## Update POP3 settings
$settings->UpdatePOP(
'enable' => 1,
'enableFor' => 'MAIL_FROM_NOW_ON',
'action' => 'KEEP',
);
## Update IMAP settings
$settings->UpdateIMAP('enable' => 1);
## Update user's vacation message
$settings->UpdateVacationResponder(
'enable' => 1,
'subject' => "I'm not here right now",
'message' => "I've lost my mind and have gone to search for it.",
'contactsOnly' => 1,
);
## Update the user's signature
$settings->UpdateSignature(
'signature' => 'Joe Cool
555-5555'
);
$settings->UpdateSignature('signature' => ''); # clear sig
## Update the display language
$settings->UpdateLanguage('language' => 'en-US');
## Update the user's general settings
$settings->UpdateGeneral('pageSize' => 50);
# You can set more than one at a time
$settings->UpdateGeneral(
'arrows' => 1,
'shortcuts' => 0,
);
like. iconic. copy-paste it, honestly. π«Ά
π¦ DESCRIPTION π¦
So this is the base class for the Email Settings API. Key thing: it is not meant to be used directly. Nope. Do not pass go. Instead, go look at the sub class for whichever version of the email settings API you're actually on. iykyk. π
π MEMBERS π
Read-write members π
base_urlβ thebase_urlfor the Email settings API calls. Example:https://apps-apis.google.com/a/feeds/emailsettings/2.0/.debugβ turns on debugging output. the little spy mode. πgoogleβ aVUser::Google::ApiProtocolobject.userβ the user name of the user you wanna modify.
π METHODS π
Okay so important tea first: all of the calls to the Google API take a hash with the options that Google specifies. The keys for that hash and what each one expects are listed below. Specific versions might use different keys. In general, the keys will match the names of the attributes in the API docs β so if something looks off, go check the docs for the API version you are using. πΈ
Note: values that are "true"/"false" are set using Perl values for true and false β that means zero for false, and literally anything else for true. Perl being Perl, bestie. π
π new (%defaults)
Creates a new EmailSettings object. Any read-write member can be set right there in the call to new(). slay.
π dprint ($message)
Prints $message to STDERR if debug is set to a true value.
π CreateLabel (%options)
Creates a new label. cute.
labelβ the label to create in Google Mail.
π CreateFilter
Creates a new mail filter. the bouncer at the club door for your inbox. πͺ
fromβ the email must come from this address in order to be filtered.toβ the email must be sent to this address in order to be filtered.subjectβ a string the email must have in its subject line to be filtered.hasTheWordβ a string the email can have anywhere in its subject or body.doesNotHaveTheWordβ a string that the email cannot have anywhere in its subject or body.hasAttachmentβ a boolean representing whether or not the email contains an attachment.labelβ the name of the label to apply if a message matches the specified filter criteria.shouldMarkAsReadβ whether to automatically mark the message as read if it matches the specified filter criteria.shouldArchiveβ whether to automatically move the message to "Archived" state if it matches the specified filter criteria.
π CreateSendAsAlias
Creates a gmail "Send-as alias." so you can be somebody else in the From line. main character energy. β¨
nameβ the name that will appear in the "From" field for this user.addressβ the email address that appears as the origination address for emails sent by this user.replyToβ (optional) if set, this address will be included as the reply-to address in emails sent using the alias.makeDefaultβ (optional) if set to true, this alias will become the new default alias to send-as for this user.
π UpdateWebClip
Updates the user's "web clip" setting.
enableβ whether to enable showing Web clips.
π UpdateForwarding
Updates gmail forwarding settings. send it on over, babe. π
enableβ whether to enable forwarding of incoming mail.forwardToβ the email will be forwarded to this address.actionβ what Google Mail should do with its copy of the email after forwarding it on.
Allowed values: "KEEP" (in inbox), "ARCHIVE", or "DELETE" (send to trash)
π UpdatePOP
Updates the user's POP3 settings.
enableβ whether to enable POP3 access.enableForβ whether to enable POP3 for all mail, or mail from now on.
Allowed values: "ALL_MAIL", "MAIL_FROM_NOW_ON"
actionβ what Google Mail should do with its copy of the email after it is retrieved using POP.
Allowed values: "KEEP" (in inbox), "ARCHIVE", or "DELETE" (send to trash)
π UpdateIMAP
Updates the user's IMAP settings.
enableβ whether to enable IMAP access.
π UpdateVactionResponder
β οΈ heads up bestie β yes, it's spelledUpdateVactionResponderright here in the methods, noaafter theV. The SYNOPSIS spells itUpdateVacationResponder. Type whatever the page you're reading tells you to, and don't let autocorrect gaslight you. π
Updates the user's vacation auto-responder. out of office, but make it fashion. ποΈ
enableβ whether to enable the vacation responder.subjectβ the subject line of the vacation responder autoresponse.messageβ the message body of the vacation responder autoresponse.contactsOnlyβ whether to only send the autoresponse to known contacts.
π UpdateSignature
Updates the user's signature.
signatureβ the signature to be appended to outgoing messages. Set the signature to''(the empty string) to clear the signature. poof, gone. πͺ
π UpdateLanguage
Updates the display language.
languageβ Google Mail's display language. This should be a language tag defined in RFC 3066. Seehttp://code.google.com/apis/apps/email_settings/developers_guide_protocol.html#GA_email_language_tagsfor a list of supported languages.
π UpdateGeneral
Updates the user's general settings. the little quality-of-life knobs. βοΈ
pageSizeβ the number of conversations to be shown per page.
Allowed values: 25, 50, 100
shortcutsβ whether to enable keyboard shortcuts.arrowsβ whether to display arrow-shaped personal indicators next to emails that were sent specifically to the user.snippetsβ whether to display snippets of messages in the inbox and when searching.unicodeβ whether to use UTF-8 (unicode) encoding for all outgoing messages, instead of the default text encoding.
π SEE ALSO π
VUser::Google::EmailSettings::V2_0,VUser::Google::ApiProtocol- Google Email Settings API β
http://code.google.com/apis/apps/email_settings/developers_guide_protocol.html
π BUGS π
Report bugs at http://code.google.com/p/vuser/issues/list. (not me manifesting bugs, just reading the page fr fr π)
π«Ά AUTHOR π«Ά
Randy Smith, perlstalker at vuser dot net
π 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.
If you make useful modification, kindly consider emailing then to me for inclusion in a future version of this module.
okay that's the whole page, bestie, you ate that π this was VUser:...ttings(3pm) as it shipped with perl v5.32.0, dated 2021-01-09 β go forth and configure some inboxes, mwah π
β¨
π¦ where this page comes from
- debian bookworm: libvuser-google-api-perl 1.0.1-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libvuser-google-api-perl 1.0.1-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libvuser-google-api-perl 1.0.1-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libvuser-google-api-perl 1.0.1-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms