/** * Imports a message into only this user's mailbox, with standard email delivery scanning and * classification similar to receiving via SMTP. Does not send a message. * * Create a request for the method "messages.import". * * This request holds the parameters needed by the the gmail server. After setting any optional * parameters, call the {@link GmailImport#execute()} method to invoke the remote operation. * * <p> * This method should be used for uploading media content. * </p> * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @param content the {@link com.google.api.services.gmail.model.Message} media metadata or {@code null} if none * @param mediaContent The media HTTP content or {@code null} if none. * @return the request * @throws java.io.IOException if the initialization of the request fails */ public GmailImport gmailImport(java.lang.String userId, com.google.api.services.gmail.model.Message content, com.google.api.client.http.AbstractInputStreamContent mediaContent) throws java.io.IOException { GmailImport result = new GmailImport(userId, content, mediaContent); initialize(result); return result; }
/** * Imports a message into only this user's mailbox, with standard email delivery scanning and * classification similar to receiving via SMTP. Does not send a message. * * Create a request for the method "messages.import". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link GmailImport#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @param content the {@link com.google.api.services.gmail.model.Message} * @return the request */ public GmailImport gmailImport(java.lang.String userId, com.google.api.services.gmail.model.Message content) throws java.io.IOException { GmailImport result = new GmailImport(userId, content); initialize(result); return result; }