Smtp?


(Ken Nash) #1

Does anyone use SMTP and O365? Our setting don’t seem to be working; I am hoping someone can help out with this.

Capture


(Brandon Anderson) #2

Those settings look right (they match ours and ours works). It’s going to be a setting in office 365. You did set up that e-mail in your office 365 right?


(Ken Nash) #3

I wonder if I need to do an IISReset after I made the change…


(Nathan your friendly neighborhood Support Engineer) #4

image


(Brandon Anderson) #5

We didn’t need to. I could change the e-mail address at will without any kind of restart, as long as either one was set up in 365.

Edit: Ha, I just realized that I didn’t know the difference between recycle and reset. I just always use recycle.


(Surendra Pal) #6

You have to Reset task agent. after updating email settings.


(Aaron Moreng) #7

Piggybacking off this question: is is possible to use these SMTP settings/account against some sort of native mailer class in custom code?
I have in the past just created my own SMTP client in the code, but this required hard coding the o365 creds into the code which is obviously not ideal.


(Ken Nash) #8

Found the issue.

When the Email is being created we need to use the donotreply@embedtek.net user as the From

Capture


(Brandon Anderson) #9

Or just leave that blank and it will default to the company setting.


(Haso Keric) #10

PS: The only Reason I have my own GetCompanyAddressAction is because it was getting the wrong Company if left blank in a Multi-Company Environment in 10.1.500.x


(Aaron Moreng) #11

Cool example. Have you seen this done outside a BPM like in a form customization though?


(Haso Keric) #12

You mean something like

var args = new EmailArgs("fromAddress@xyz.com", "to@xyz.com", "cc@xyz.com", "The best subject ever", "Message");
// args.Priority, args.Attachments, args.Address
EmailHandler.SendMail(args);

The Epicor Client Library has a few helpers which are used by other Send Email Dialogs.


(Aaron Moreng) #13

oo that’s cool, I’ll have to check that out! Thanks man


(Surendra Pal) #14

office 365 not allowing anonymous relay due to security so you cannot change from address. if you want enable anonymous relay. follow this link https://technet.microsoft.com/en-us/library/mt668454(v=exchg.160).aspx