Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Email ATTACHMENT in DNNEmail ATTACHMENT in DNN
Previous
 
Next
New Post
1/15/2009 8:28 AM
 

Hey Guys

 

I am trying to send an email with an attachment in DNN

 

The method is as follows

 

DNN.Mail.Mail.SendMail (To as string, FROM as string, MSG as string, ATTACHMENT as string as well)

 

I have tried just giving the path to the file as "C:/test.pdf", but this doesnt work

 

How do I actually do this? There are no examples on the internet

 

If there is no solution, how do I access the portal SMTP user  / pass / server settings, then I will use the .NET method of sending emails.

 

Thank You

 
New Post
1/15/2009 1:43 PM
 

the attachment needs to be on the server and you need to pass a valid url to get it added. Check out the core newsletter module for example.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
1/12/2011 3:04 PM
 
I checked the mail.vb file and the full path of where the file lives should be used.

A problem here is when using the FileSystemUtils to upload the file it is saved with .resources extension. How can i attach the file with the correct extension? Any ideas how to get passed that?

Thanks!
 
New Post
4/5/2013 11:14 AM
 

Ciao mbares, sugnu u ZzaRazzioCollaTigna (parentesi "il vusuraio") .

Lassatilu peddiri a mbari Leo!

Ammuccativi a vera soluzioni funzionanti!! (Check this!)    ;)

List<System.Net.Mail.Attachment> lstAttachments = new List<System.Net.Mail.Attachment>();
                        System.IO.FileInfo fi = new System.IO.FileInfo("c:\\fullpathfile\\filename.pdf");
                        lstAttachments.Add(new System.Net.Mail.Attachment(new FileStream(strOutputFilename, FileMode.Open), fi.Name, "application/pdf" ));
                        DotNetNuke.Services.Mail.Mail.SendEmail("from@mail.com", "sender@mail.com", "to@mail.com", "subject", "body", lstAttachments);

 

PPi sta vota gratis! A prossima ata sganciari 'na cambiala!

 
New Post
6/26/2014 10:44 AM
 
ZzaRazzioCollaTigna wrote:

Ciao mbares, sugnu u ZzaRazzioCollaTigna (parentesi "il vusuraio") .

Lassatilu peddiri a mbari Leo!

Ammuccativi a vera soluzioni funzionanti!! (Check this!)    ;)

List<system.net.mail.attachment> lstAttachments = new List<system.net.mail.attachment>();
                        System.IO.FileInfo fi = new System.IO.FileInfo("c:\\fullpathfile\\filename.pdf");
                        lstAttachments.Add(new System.Net.Mail.Attachment(new FileStream(strOutputFilename, FileMode.Open), fi.Name, "application/pdf" ));
                        DotNetNuke.Services.Mail.Mail.SendEmail("from@mail.com", "sender@mail.com", "to@mail.com", "subject", "body", lstAttachments);

 </system.net.mail.attachment></system.net.mail.attachment>

PPi sta vota gratis! A prossima ata sganciari 'na cambiala!

 

 

Oh coso, è ci son ringrullio un c'aveo capiho nulla dicchè t'avei detto, menomale ho messo i'gugol traduttore aimmeno c'ho capio quarcosa di più!

:D 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Email ATTACHMENT in DNNEmail ATTACHMENT in DNN


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out