Solved

Asp.net mvc4

Posted on 2014-11-17
3
368 Views
Last Modified: 2015-03-27
Hi guys ,

I have some report button in my application "asp.net mvc4" and I would like to open outlook send message when users click on the button. is it possible to do so?  or there is other way to do it.

Please , advice.



Thansk ,
0
Comment
Question by:Moti Mashiah
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
Richard Lee earned 500 total points
ID: 40449424
To open outlook from  web application it would have to be set at the user's default email application and a link such as the following would have to be in your application.

<a href="mailto:abc@abc.com?Subject=ABC&Body=Body" title="title" >Email</a>

Open in new window


Since I don't believe that is what you are asking for, but more of an automated approach I would suggest that it would be better to send the email from the web application. Provide the fields for the user to enter the message and subject and when the Send button is clicked then send the email using some SMTP service from your application.

I wrote a component Fluent.NET Mail that allows the easy sending of email and constructs personalised emails.

new Mail()
    .Html(new MessageTemplate()
        .FromText("This is my email with {content} text")
        .DataFrom(new { content = "html" })
        .BetweenBraces())
    .To(new MailBox(emailAddress))
    .From(new MailBox(emailAddress))
    .Subject("Fluent API .NET 2")
    .Timeout(5000)
    .SmtpServer("[your smtp server]")
    .Send();

Open in new window


http://www.avantprime.com/products/docs/fluent-net-mail/

I hope this helps.
0
 
LVL 1

Author Comment

by:Moti Mashiah
ID: 40450168
Thank you for your answer.

please , would you be able to send me some instruction how to implement the HTML page mvc for that and the controller side what you did already.

I'm really new to this and i need some step by step instruction.

please see attachment of my application to get any idea;

when you click on report button it should popup window (i assume with jquery ) and this window should give you the page email view to send email.

thanks email.JPG
0
 
LVL 1

Author Closing Comment

by:Moti Mashiah
ID: 40692056
solved
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now