Sending email from Server Connect on an aspx project

Which IIS version does the server run? Is the SMTP service installed on the server and configured under IIS?

Version 10, and yes the smtp is installed and configured

I checked the ASP.NET code to see what code we exactly use. If you have no smtp given we use the default pickup directory as configured from IIS.

mailer.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis

ASP.NET gets the the pickup directory from the IIS metabase, when you get the error then a common cause is simply the missing IIS SMTP service or ASP.NET has no permission to read that entry from the metabase.

I can add an extra option to set a custom pickup directory.

Thanks Patrick, just waiting for the server admin to respond so I can see where to next, will let you know as soon as possible.

Hey Patrick do you think you could add that option for us, we have been trying multiple server settings and so far we are not really coming right.

Here is the updated mailer, place the files in you Bin folder.

DMXzone.ServerConnect.Mailer.zip (7.5 KB)

You need to edit the server action by hand, in the json add an extra property to the options for the mail setup step. Add "pickupDirectory": "C:\\inetpub\\mailroot\\Pickup".

3 Likes

Worked perfectly, i don’t know where you store all this brain power Patrick

Thank you

I am in the latest Wappler 3.7.3 and doing another ASPX project for the same client on the same server with the same mail server etc, and used the exact same settings as the previous project, but keep geting an error for the mail send. Any ideas @patrick

Screenshot 2021-01-28 at 09.41.46

How are you using the setup mail step? Isn’t it defined under globals?

Yes, under Globals for the Setup step, and then inside the action for the Send Mail step?

What if you change the name to something else - like mail1 and select it again in the send mail step?

I tried that first, I had a global called MOJmail and when it looked like it could not locate the file on the server, and I confirmed that the file was indeed there, then I tried to just use the default name rather, I think we had a similar thought there, haha.

So what does the error message say when using a name different than mail - just the saying it cannot find instance ...

Yes, I think its the same message just with the different name

Any chance this is just a simple path fix on the aspx side, on a massive deadline hence why I am trying to quickly figure out a plan.

Maybe @patrick can check what’s wrong

1 Like

Thanks so much, feed him beer for me Teo, lol.