Maintain control of your Microsoft 365 data
Post Reply
b.st
Novice
Posts: 6
Liked: 2 times
Joined: Apr 30, 2020 6:13 pm
Contact:

Sending OneDrive document as email attachment

Post by b.st »

Hi,

We're trying to use a REST API call to send a OneDrive document as an email attachment and it's failing with "Error: The SMTP host was not specified." The SMTP was configured through Veeam Backup for Office 365 UI as well as through Veeam Explorer for Microsoft OneDrive for Business but none of these seem to have any effect on the REST API. A note on https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=40 says we must first specify "VESP email settings by sending PUT HTTPS request to the /VESPEmailSettings URL".

Few questions:
  1. Why do we need to specify VESP (SharePoint) email settings if we're trying to send a OneDrive document? I noticed there's also Exchange (/VEXEmailSettings) and OneDrive (/VEODEmailSettings) email settings...
  2. Since specifying SharePoint email settings didn't help in our case we tried using the OneDrive (/VEODEmailSettings) REST API which took some trial&error to update the settings successfully (the REST API docs seem to be out of sync with the actual REST API). Sending a OneDrive document as an attachment (through the API) started working after that. The question here is when do we need to configure the email (SMTP) settings. Is this a one time task (when setting up a new Veeam Backup for Office 365 instance) or do we need to do it regularly (e.g. before trying to send an email througn REST API)?
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Sending OneDrive document as email attachment

Post by nielsengelen »

1) This is most likely a mistake in our documentation and should get resolved. Thanks for reporting. For OneDrive for /VEODEmailSettings should be used.
2) Once configured, they should be set until you want to change them.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
b.st
Novice
Posts: 6
Liked: 2 times
Joined: Apr 30, 2020 6:13 pm
Contact:

Re: Sending OneDrive document as email attachment

Post by b.st »

Thanks for the answers.
Just to clear things up... The email settings in Veeam Explorer for Microsoft OneDrive for Business have nothing to do with settings used in REST API?
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Sending OneDrive document as email attachment

Post by nielsengelen »

Mail settings are specific to the related machine which runs the client so if you install it on your workstation, the settings can be different compared to what is in the RESTful API. The RESTful API stores these settings server side.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
b.st
Novice
Posts: 6
Liked: 2 times
Joined: Apr 30, 2020 6:13 pm
Contact:

Re: Sending OneDrive document as email attachment

Post by b.st »

One more thing... How are application specific email settings (/VEXEmailSettings, /VESPEmailSettings, /VEODEmailSettings) and genereal email settings (/VBOEmailSettings) handled? Should configuring the general settings cover also application speciific settings or do we need to configure each of the application specifics?
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Sending OneDrive document as email attachment

Post by nielsengelen »

They are specific so you need to configure each of them besides the general notification/email settings.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests