| Author |
Topic |
|
burzum
Yak Posting Veteran
55 Posts |
Posted - 2012-07-19 : 16:15:36
|
| Hi,I will try to explain my problem as clear as possible.I wrote a program in C# that converts file from crystal reports to .pdf. That works no problem.My second task is to email this pdf's. Each pdf will have ONE recipient. Email addresses are stored in the database.Is there a way I can email those pdf's from sql?My pdf's are not stored in the database, they are in the folder on the server. But if I would have to save their path or even file itself I have no problem with that.The reason I want to do this within the sql server, is that I ONLY want to email report if the total number is greater than 0. It's easier to do within the database itself.I'm still trying to do this in C# as well, however it's not working out.Any ideas or suggestions on how I can resolve this issue? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
burzum
Yak Posting Veteran
55 Posts |
Posted - 2012-07-19 : 16:58:58
|
| I've look in to that, however I do not understand how would I pass the attachements and multiple recipients? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
burzum
Yak Posting Veteran
55 Posts |
Posted - 2012-07-20 : 11:37:32
|
| Thank you.Right now, I'm saving the pdf files that I want to email to multiple users are stored into the folder. Could you please give some examples on how I can save the path of the pdf file into the database so it saves it in the row for the company. And how does it going to know to send it to specific email which is for that company. I do not want to send email one by one. I want to send them to all. (The one that has the path for it). |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
burzum
Yak Posting Veteran
55 Posts |
Posted - 2012-07-20 : 13:18:01
|
| Yes, that's a hole thing. Is there any example or link I can use. I just don't know what kind of approach to take. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-07-20 : 22:03:10
|
I think you are going the wrong direction. Since your C# program is generating the PDF file, naturally it will be easier to do this in your C# prog rather than via SQL (not that you can't do it there). The information you required on SQL to decide whether to send email or not can be retrieve easily via a simple SELECT statement. Though, you can't get it work in C#, why just stop there ? Find out what's the problem, post your problem on C# forum, search the net for more examples likehttp://www.emailarchitect.net/easendmail/kb/csharp.aspxAnd there are lots more of similar stuff out there. Just search. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|