Click here to Skip to main content
15,893,663 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Links in dynamic datagrid Pin
nachiket0718-Feb-10 12:15
nachiket0718-Feb-10 12:15 
GeneralRe: Links in dynamic datagrid Pin
Dinesh Mani18-Feb-10 18:11
Dinesh Mani18-Feb-10 18:11 
GeneralRe: Links in dynamic datagrid Pin
nachiket0719-Feb-10 19:29
nachiket0719-Feb-10 19:29 
QuestionAn existing connection was forcibly closed by the remote host Pin
adeeeb17-Feb-10 10:17
adeeeb17-Feb-10 10:17 
Questionhow to store first page's primary key key value in second pages foreign key attribute. Pin
jattscorpion17-Feb-10 7:24
jattscorpion17-Feb-10 7:24 
AnswerRe: how to store first page's primary key key value in second pages foreign key attribute. Pin
Abhishek Sur17-Feb-10 9:48
professionalAbhishek Sur17-Feb-10 9:48 
GeneralRe: how to store first page's primary key key value in second pages foreign key attribute. Pin
jattscorpion17-Feb-10 12:31
jattscorpion17-Feb-10 12:31 
QuestionHow to set the sender address (Field From) usin MAPI Pin
nahelpa17-Feb-10 6:41
nahelpa17-Feb-10 6:41 
Hi,

I need to know how use the field "from" to send an email.

I think once i created the object mapi, like private Mapi ma= new Mapi(); one of the methods is SetSender(string name,string addr), but when I send the email allways shows me email account.

Here is my code (Windows Application C#):
http://i49.tinypic.com/il8zkw.jpg


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Win32Mapi;

namespace MailMapi
{

public partial class Form1 : Form
{
private Mapi ma = new Mapi();
// private bool first_activated = false;
// private Font boldFont;
// MailEnvelop currentMail;
// MailComparer comparer = new MailComparer();

public Form1()
{
InitializeComponent();
}


private void Form1_Load(object sender, EventArgs e)
{

}

private void bf_Click(object sender, EventArgs e)
{
string name; string addr;
if (ma.SingleAddress(null, out name, out addr))
tf.Text = name;
ma.SetSender(tf.Text, null);
}

private void bt_Click(object sender, EventArgs e)
{
string name; string addr;
if (ma.SingleAddress(null, out name, out addr))
tto.Text = name;
}

private void bcc_Click(object sender, EventArgs e)
{
string name; string addr;
if (ma.SingleAddress("CC", out name, out addr))
tcc.Text = name;
}

private void bsend_Click(object sender, EventArgs e)
{

string ssubject ="**"+cbapp.Text+" code n°"+tbinc.Text;
string sbody="Dear "+tbclt.Text+",";
sbody+="\n\tbody.Text;
sbody += ssign;

ma.AddRecip(tto.Text, null, false);


if (tcc.Text != null)
{
if (tcc.Text.Length > 0)
ma.AddRecip(tcc.Text, null, true);
}

if (!ma.Send(ssubject, sbody))
MessageBox.Show(this, "MAPISendMail failed! " + ma.Error(), "Send Mail", MessageBoxButtons.OK, MessageBoxIcon.Warning);

ma.Reset();

}
}
}
QuestionEvent on asp:calendar Pin
_ASPAle_17-Feb-10 6:06
_ASPAle_17-Feb-10 6:06 
AnswerRe: Event on asp:calendar Pin
Brij17-Feb-10 19:22
mentorBrij17-Feb-10 19:22 
GeneralRe: Event on asp:calendar Pin
_ASPAle_18-Feb-10 0:04
_ASPAle_18-Feb-10 0:04 
QuestionNeed some assistance with adding a datarow to a datatable Pin
Will Talley17-Feb-10 5:34
Will Talley17-Feb-10 5:34 
AnswerRe: Need some assistance with adding a datarow to a datatable Pin
Abhishek Sur17-Feb-10 5:59
professionalAbhishek Sur17-Feb-10 5:59 
GeneralRe: Need some assistance with adding a datarow to a datatable Pin
Will Talley18-Feb-10 2:38
Will Talley18-Feb-10 2:38 
AnswerRe: Need some assistance with adding a datarow to a datatable Solved! Pin
Will Talley18-Feb-10 4:58
Will Talley18-Feb-10 4:58 
Questionbinding data to a data list Pin
arindam201017-Feb-10 5:18
arindam201017-Feb-10 5:18 
AnswerRe: binding data to a data list Pin
Abhishek Sur17-Feb-10 6:02
professionalAbhishek Sur17-Feb-10 6:02 
GeneralRe: binding data to a data list Pin
arindam201017-Feb-10 6:56
arindam201017-Feb-10 6:56 
GeneralRe: binding data to a data list Pin
Abhishek Sur17-Feb-10 9:44
professionalAbhishek Sur17-Feb-10 9:44 
AnswerRe: binding data to a data list Pin
Anurag Gandhi17-Feb-10 6:37
professionalAnurag Gandhi17-Feb-10 6:37 
GeneralRe: binding data to a data list Pin
arindam201017-Feb-10 6:54
arindam201017-Feb-10 6:54 
GeneralRe: binding data to a data list Pin
Anurag Gandhi17-Feb-10 15:52
professionalAnurag Gandhi17-Feb-10 15:52 
QuestionWeb Service Protection with Client Certificates Pin
captainone17-Feb-10 3:55
captainone17-Feb-10 3:55 
AnswerRe: Web Service Protection with Client Certificates Pin
Ennis Ray Lynch, Jr.17-Feb-10 5:19
Ennis Ray Lynch, Jr.17-Feb-10 5:19 
GeneralRe: Web Service Protection with Client Certificates Pin
captainone18-Feb-10 17:46
captainone18-Feb-10 17:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.