This article documents the usage of the Cpanel::Email::addforward function in relation to the cPanel interface. This tag can be used inside cPanel pages.
Cpanel::Email::addforward
This tag creates a forwarder for a specific email account.
- fwdemail (string)
-
Email account to forward mail to. Format: user@domain.com
- failmsgs (string)
-
Content of message to sender if mail account is set to fail with message to sender.
- fwdopt (string)
-
Options for where account is forwarded to. (blackhole, fail, fwd, pipe)
- pipefwd (string)
-
Path of program to pipe mail to, if set to pipe mail. Relative to /home/username/
- domain (string)
-
Domain of email user to be forwarded. Format: domain.com
- email (string)
-
Username of email account to be forwarded. Format: user
- forward (string)
-
Where the mail is forwarded to.
- domain (string)
-
Domain for forwarded mail user. Format: domain.com
- email (string)
-
Username for forwarded mail. Format: user
?cp Email::addforward(% %,email,forward) email=$FORM{'email'},domain=$FORM{'domain'},fwdopt=$FORM{'fwdopt'},failmsgs=$FORM{'failmsgs'},pipefwd=$FORM{'pipefwd'},fwdemail=$FORM{'fwdemail'} ?>
This example will add a forwarder for an email account based on input from a form. It will display the username that is being forwarded and where the mail is being forwarded to.
Copyright 2007 cPanel Inc.