Click here to Skip to main content
15,896,348 members
Home / Discussions / C#
   

C#

 
GeneralRe: function browsing in propertygrid Pin
Robert Rohde20-Apr-06 22:22
Robert Rohde20-Apr-06 22:22 
GeneralRe: function browsing in propertygrid Pin
leppie20-Apr-06 22:55
leppie20-Apr-06 22:55 
Questionget Toolbox Pin
AnhTin20-Apr-06 20:47
AnhTin20-Apr-06 20:47 
AnswerRe: get Toolbox Pin
g00fyman20-Apr-06 21:10
g00fyman20-Apr-06 21:10 
QuestionUsing .rar/.zip documents Pin
QzRz20-Apr-06 20:37
QzRz20-Apr-06 20:37 
AnswerRe: Using .rar/.zip documents Pin
Robin Panther20-Apr-06 23:57
Robin Panther20-Apr-06 23:57 
QuestionMicrosoft controls Tree View control problem Pin
smadan20-Apr-06 20:11
smadan20-Apr-06 20:11 
QuestionHow to send the e-mail? Pin
Vasya - dragon20-Apr-06 20:09
Vasya - dragon20-Apr-06 20:09 
Good afternoon.
How to send e-mail that there was no window Outlook Security?
public bool Send( string sub, string txt )
{
lastMsg = new MapiMessage();
lastMsg.subject = sub;
lastMsg.noteText = txt;

// set pointers
lastMsg.originator = AllocOrigin();
lastMsg.recips = AllocRecips( out lastMsg.recipCount );
lastMsg.files = AllocAttachs( out lastMsg.fileCount );

error = MAPISendMail( session, winhandle, lastMsg, 0, 0 ); // WARNING Outlook SecurityOutlook Security
Dealloc();
Reset();
return error == 0;
}

[DllImport( "MAPI32.DLL")]
private static extern int MAPISendMail( IntPtr sess, IntPtr hwnd,
MapiMessage message,
int flg, int rsv );
private MapiRecipDesc origin = new MapiRecipDesc();
private ArrayList recpts = new ArrayList();
private ArrayList attachs = new ArrayList();

oSession = new MAPI.Session();
oSession.Logon(Missing.Value, Missing.Value, true, true, Missing.Value, Missing.Value, Missing.Value);
MAPI.Folder oFolder = (MAPI.Folder)oSession.Outbox;
MAPI.Messages oMessages = (MAPI.Messages)oFolder.Messages;
MAPI.Message oMsg = (MAPI.Message)oMessages.Add(Missing.Value, Missing.Value, Missing.Value, Missing.Value);
MAPI.Recipients oRcpt = (MAPI.Recipients)oMsg.Recipients;
oRcpt.Add("SMTP:xxx@xxx.xxx", "SMTP:xxx@xxx.xxx", MAPI.CdoRecipientType.CdoTo, Missing.Value);
oRcpt.Resolve(Missing.Value); // WARNING Outlook Security
oMsg.Subject = "Test Message";
oMsg.Text = "This is a test message...";
oMsg.Send(Missing.Value, Missing.Value, Missing.Value);
oSession.Logoff();

Thanks!
Questionthreading and progressbar in windows form Pin
karande2320-Apr-06 19:59
karande2320-Apr-06 19:59 
AnswerRe: threading and progressbar in windows form Pin
g00fyman20-Apr-06 21:05
g00fyman20-Apr-06 21:05 
GeneralRe: threading and progressbar in windows form Pin
karande2320-Apr-06 21:46
karande2320-Apr-06 21:46 
AnswerRe: threading and progressbar in windows form Pin
Robert Rohde20-Apr-06 22:28
Robert Rohde20-Apr-06 22:28 
GeneralThanks Pin
karande2320-Apr-06 23:02
karande2320-Apr-06 23:02 
Questionreading a remote file Pin
DeepsG20-Apr-06 19:26
DeepsG20-Apr-06 19:26 
AnswerRe: reading a remote file Pin
alexey N20-Apr-06 19:37
alexey N20-Apr-06 19:37 
GeneralRe: reading a remote file Pin
DeepsG20-Apr-06 20:27
DeepsG20-Apr-06 20:27 
AnswerRe: reading a remote file Pin
Guffa20-Apr-06 20:38
Guffa20-Apr-06 20:38 
GeneralRe: reading a remote file Pin
DeepsG20-Apr-06 20:55
DeepsG20-Apr-06 20:55 
AnswerRe: reading a remote file Pin
Guffa20-Apr-06 21:47
Guffa20-Apr-06 21:47 
AnswerRe: reading a remote file Pin
DeepsG20-Apr-06 21:26
DeepsG20-Apr-06 21:26 
GeneralRe: reading a remote file Pin
Guffa20-Apr-06 23:22
Guffa20-Apr-06 23:22 
Questionregarding the coding Pin
siddharth2write20-Apr-06 18:20
siddharth2write20-Apr-06 18:20 
AnswerRe: regarding the coding Pin
Stefan Troschuetz20-Apr-06 22:36
Stefan Troschuetz20-Apr-06 22:36 
AnswerRe: regarding the coding Pin
Robert Rohde20-Apr-06 22:38
Robert Rohde20-Apr-06 22:38 
Questionschedulling Pin
g00fyman20-Apr-06 18:17
g00fyman20-Apr-06 18:17 

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.