Quantcast
Channel: NBStore Discussions Rss Feed
Viewing all articles
Browse latest Browse all 4081

New Post: EMail Attachments

$
0
0
To be honest, I avoid attaching pdf's to email in server side code. I know it's possible, but you have no real control over what's attached and if the smtp will accept it, so it could lead to emails being blocked. I know this might seem paranoid, but it's simply 1 less thing to worry about when sending emails.

If you need to do this, you'll need to change the code in NBS. I think the current version is using the DNN sendemail function, I'm not sure if that supports email attachments or not, if not you'll need to build your own function to send emails. In c# the code for attaching emails goes something like this..
            System.Net.Mail.Attachment attachment;
            attachment = new System.Net.Mail.Attachment("your attachment file");
            mail.Attachments.Add(attachment);

But there are plenty of exmaples on the web.

Viewing all articles
Browse latest Browse all 4081

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>