TOPIC: MSMAPI integration ?
#1316
MSMAPI integration ? 1 Year, 6 Months ago
Hi

I was wondering if there was any way to invoke the "Default" email client, create a new message and attach a file to the message. Something like www.thescarms.com/vbasic/MapiEmail.aspx

Thanks
nz
 
 
#1319
Re:MSMAPI integration ? 1 Year, 6 Months ago
I don't think Suneido has anything like that yet. The closest thing I can think of is the MailLinkControl which brings up the mail client when you double click the address in it.

Is anyone else aware of any MAPI integration done with Suneido?
 
 
Jeff Ferguson
Suneido Software
 
#1321
Re:MSMAPI integration ? 1 Year, 6 Months ago
i have found "Microsoft CDO Collaboration Data Objects"
(cdosys.dll standard with win XP pro) that permit to send
emails with attachments, easy and rapidly with suneido
from an XP pc

i tested this object with suneido and worked well
but sorry i am not able to find the suneido code
i wrote two years ago to use cdosys.
 
 
#1322
Re:MSMAPI integration ? 1 Year, 6 Months ago
Here is the code that Claudio sent me in 2007

Code:

//Microsoft CDO Collaboration Data Objects
function()
{
 
crlf= "x0dx0a"
msg = COMobject("CDO.Message")
 
msg.From = " This e-mail address is being protected from spam bots, you need JavaScript enabled to view it "
msg.To = " This e-mail address is being protected from spam bots, you need JavaScript enabled to view it "
msg.Cc=" This e-mail address is being protected from spam bots, you need JavaScript enabled to view it "
//msg.Bcc=" This e-mail address is being protected from spam bots, you need JavaScript enabled to view it "
msg.Subject = "Suneido now send emails through CDO!!!"
 
msg.HTMLBody = '<HTML>'$crlf$
'<HEAD>'$crlf$
'<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">'$crlf$
'<META NAME="Generator" CONTENT="Microsoft Word 97">'$crlf$
'<TITLE>This is an automated easy way to send emails</TITLE>'$crlf$
'</HEAD>'$crlf$
'<BODY>'$crlf$
'<FONT FACE="Arial"><P>This is an automated easy way to send emails</P>'$crlf$
'<U><FONT FACE="Arial" COLOR="#ff0000"><P>directly from Suneido</P>'$crlf$
'</U></FONT><FONT FACE="Arial"><P>using Microsoft XP CDO component</P>'$crlf$
'<P>Claudio</P>'$crlf$
'</FONT><FONT SIZE=2>'$crlf$
'</FONT><B><I><FONT FACE="Verdana" SIZE=2><P>there are two attachments created with Suneido</P>'$crlf$
'</B></I></FONT><FONT SIZE=2></FONT></BODY>'$crlf$
'</HTML>'$crlf
 
/*
msg.TextBody = "This is an automated easy way to send emails"$crlf$
      "directly from Suneido"$crlf$
      "using Microsoft XP CDO component"$crlf$crlf$
      "Claudio"$crlf$crlf$crlf$crlf$
      "there are two attachments created with Suneido"$crlf
*/
 
msg.AddAttachment("C:\Temp\menu.txt")
msg.AddAttachment("C:\Temp\menu.pdf")
 

smtp_server_local_IIS= 1
smtp_server_remote= 2
msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing").Value = smtp_server_remote //1=local, 2=remote SMTP server
msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value = "smtp.gmail.com"
msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport").Value = 465 //25
 
auth_anonymous= 0 //Do not authenticate
auth_basic= 1     //basic (clear-text) authentication
auth_ntlm= 2      //NTLM
msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").Value = auth_basic
 
msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername").Value = "claudioitalia"
msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword").Value = "yourpassword"
msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl").Value = true
msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout").Value = 60
msg.Configuration.Fields.Update()
 
try
 {
 msg.Send()
 Print('Mail sended')
 }
catch (e)
 Print(e)
 

//  }
msg.Release()
 
/*
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/39186eaa-c4c1-430a-9715-35e291925c5c.asp
http://www.ilopia.com/Articles/WindowsServer2003/CDO.aspx
http://www.paulsadowski.com/WSH/cdo.htm
*/
}

 
 
andrew