Method: users.settings.sendAs.create
יצירת כתובת אימייל חלופית מותאמת אישית שנשלחת אל 'מאת'. אם צוין MSA של SMTP, Gmail ינסה להתחבר לשירות ה-SMTP כדי לאמת את התצורה לפני יצירת הכינוי. אם נדרש אימות בעלות עבור כתובת האימייל החלופית, תישלח הודעה לכתובת האימייל וסטטוס האימות של המשאב יוגדר ל-pending
. אחרת, המשאב ייווצר עם סטטוס אימות המוגדר לaccepted
. אם סופקה חתימה, Gmail ינקה את ה-HTML לפני שמירתו עם הכינוי.
השיטה הזו זמינה רק ללקוחות של חשבונות שירות שקיבלו סמכות ברמת הדומיין.
בקשת HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/sendAs
בכתובת ה-URL נעשה שימוש בתחביר המרת gRPC.
פרמטרים של נתיב
פרמטרים |
userId |
string
זוהי כתובת האימייל של המשתמש. ניתן להשתמש בערך המיוחד 'me' כדי לציין את המשתמש המאומת.
|
גוף הבקשה
גוף הבקשה מכיל מופע של SendAs
.
גוף התגובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע חדש של SendAs
שנוצר.
היקפי הרשאות
נדרש היקף OAuth הבא:
https://www.googleapis.com/auth/gmail.settings.sharing
למידע נוסף, ניתן לעיין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-05 (שעון UTC).
[null,null,["עדכון אחרון: 2024-09-05 (שעון UTC)."],[[["Creates a custom \"from\" send-as alias, requiring validation for SMTP MSAs and potentially ownership verification."],["Accessible only to service account clients with delegated domain-wide authority, using a specific HTTP POST request."],["Utilizes path parameters including `userId` to identify the user's email address, and requires a request body with a `SendAs` instance."],["Returns a `SendAs` instance in the response body upon successful alias creation."],["Needs authorization with the `https://www.googleapis.com/auth/gmail.settings.sharing` scope."]]],["This describes how to create a custom \"from\" send-as alias in Gmail using a `POST` request to the specified URL. The request includes a `userId` path parameter. The request body contains `SendAs` information, and the response will also be a `SendAs` instance. The creation process may involve SMTP validation and alias verification, setting the resource's verification status accordingly. It also sanitizes provided HTML signatures. This method is limited to service account clients with delegated domain-wide authority and requires a specific OAuth scope.\n"]]