Web Connection
Send Email with jpg in body
Gravatar is a globally recognized avatar based on your email address. Send Email with jpg in body
  n/a
  All
  Oct 20, 2014 @ 08:57pm
If I generate a report with jpg output from xfrx, how would I then insert the jpg in the body of an email that is send with sendemail()?


Thanks in advance.

Jim Day


Gravatar is a globally recognized avatar based on your email address. Re: Send Email with jpg in body
  Rick Strahl
  Jim Day
  Oct 20, 2014 @ 11:02pm

Take a look at this help topic:

wcdocs:_2qm12el7y.htm

Note you have to use .NET mode for this to work - there's no support for embedded data in messages in classic mode.

+++ Rick ---


If I generate a report with jpg output from xfrx, how would I then insert the jpg in the body of an email that is send with sendemail()?


Thanks in advance.

Jim Day



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Send Email with jpg in body
  n/a
  Rick Strahl
  Nov 2, 2014 @ 08:27am
i have used the example in the documentation but get the following error


Error 1754 Cannot find entry point SetClrVersion in the DLL.

Method setclrversion

Line 177

I am using version 5.55


Take a look at this help topic:

wcdocs:_2qm12el7y.htm

Note you have to use .NET mode for this to work - there's no support for embedded data in messages in classic mode.

+++ Rick ---


If I generate a report with jpg output from xfrx, how would I then insert the jpg in the body of an email that is send with sendemail()?


Thanks in advance.

Jim Day



Gravatar is a globally recognized avatar based on your email address. Re: Send Email with jpg in body
  Rick Strahl
  Jim Day
  Nov 2, 2014 @ 02:51pm

Make sure wwipstuff.dll is available...

If that doesn't work download a more recent version...

+++ Rick ---



i have used the example in the documentation but get the following error


Error 1754 Cannot find entry point SetClrVersion in the DLL.

Method setclrversion

Line 177

I am using version 5.55


Take a look at this help topic:

wcdocs:_2qm12el7y.htm

Note you have to use .NET mode for this to work - there's no support for embedded data in messages in classic mode.

+++ Rick ---


If I generate a report with jpg output from xfrx, how would I then insert the jpg in the body of an email that is send with sendemail()?


Thanks in advance.

Jim Day






Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Send Email with jpg in body
  n/a
  Rick Strahl
  Nov 2, 2014 @ 05:14pm
wwipstuff is loading now. Think I had the wrong version.
Now I get error in wwdotnetbridge.invokemethod line 463

OLE IDispatch exception code 0 from mscorlib: Method 'System.DBNull.ContentId' not found...

This is my code as maybe this is wrong

DO wwSmtp
LOCAL loSmtp as wwSmtp
loSmtp = CREATEOBJECT("wwSmtp")

loSmtp.nMAILMODE = 2

loSmtp.cSubject = "Test Message through wwIPstuff"
loSmtp.cMessage = "This message contains rich text content as an alternate view"
loSmtp.cContentType = "text/plain"

*** create alternate view
LOCAL loAlternateView as wwSmtpAlternateView
loAlternateView = CREATEOBJECT("wwSmtpAlternateView")
loAlternateView.cText = "<b>Hello</b> world! <img src='cid:tcreminder' />"
loAlternateView.cContentType = "text/html"
loAlternateView.AddLinkedResource("c:\tcreminder.jpg","image/jpeg","tcreminder")

loSmtp.Addalternateview( loAlternateView )
*** Send it
llResult = loSmtp.Sendmail()


Error is generated in the loSmtp.Addalternateview line
the jpg is in the root of c:

Thanks for your help.

Jim


Make sure wwipstuff.dll is available...

If that doesn't work download a more recent version...

+++ Rick ---



i have used the example in the documentation but get the following error


Error 1754 Cannot find entry point SetClrVersion in the DLL.

Method setclrversion

Line 177

I am using version 5.55


Take a look at this help topic:

wcdocs:_2qm12el7y.htm

Note you have to use .NET mode for this to work - there's no support for embedded data in messages in classic mode.

+++ Rick ---


If I generate a report with jpg output from xfrx, how would I then insert the jpg in the body of an email that is send with sendemail()?


Thanks in advance.

Jim Day






Gravatar is a globally recognized avatar based on your email address. Re: Send Email with jpg in body
  Rick Strahl
  Jim Day
  Nov 3, 2014 @ 09:57am
Don't know... make sure you use the latest version just to make sure... Also make sure that the file exists and that you have rights to it...

+++ Rick ---



wwipstuff is loading now. Think I had the wrong version.
Now I get error in wwdotnetbridge.invokemethod line 463

OLE IDispatch exception code 0 from mscorlib: Method 'System.DBNull.ContentId' not found...

This is my code as maybe this is wrong

DO wwSmtp
LOCAL loSmtp as wwSmtp
loSmtp = CREATEOBJECT("wwSmtp")

loSmtp.nMAILMODE = 2

loSmtp.cSubject = "Test Message through wwIPstuff"
loSmtp.cMessage = "This message contains rich text content as an alternate view"
loSmtp.cContentType = "text/plain"

*** create alternate view
LOCAL loAlternateView as wwSmtpAlternateView
loAlternateView = CREATEOBJECT("wwSmtpAlternateView")
loAlternateView.cText = "<b>Hello</b> world! <img src='cid:tcreminder' />"
loAlternateView.cContentType = "text/html"
loAlternateView.AddLinkedResource("c:\tcreminder.jpg","image/jpeg","tcreminder")

loSmtp.Addalternateview( loAlternateView )
*** Send it
llResult = loSmtp.Sendmail()


Error is generated in the loSmtp.Addalternateview line
the jpg is in the root of c:

Thanks for your help.

Jim


Make sure wwipstuff.dll is available...

If that doesn't work download a more recent version...

+++ Rick ---



i have used the example in the documentation but get the following error


Error 1754 Cannot find entry point SetClrVersion in the DLL.

Method setclrversion

Line 177

I am using version 5.55


Take a look at this help topic:

wcdocs:_2qm12el7y.htm

Note you have to use .NET mode for this to work - there's no support for embedded data in messages in classic mode.

+++ Rick ---


If I generate a report with jpg output from xfrx, how would I then insert the jpg in the body of an email that is send with sendemail()?


Thanks in advance.

Jim Day









Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Send Email with jpg in body
  n/a
  Rick Strahl
  Nov 6, 2014 @ 05:09pm
I upgraded to the current version. The program runs through but the jpg does not display in outlook or google mail.

Just before the sendmail() function all the items are properly loaded as best I can tell.

not quite sure how I can tell that AddLinkedResource worked.

Jim


Don't know... make sure you use the latest version just to make sure... Also make sure that the file exists and that you have rights to it...

+++ Rick ---



wwipstuff is loading now. Think I had the wrong version.
Now I get error in wwdotnetbridge.invokemethod line 463

OLE IDispatch exception code 0 from mscorlib: Method 'System.DBNull.ContentId' not found...

This is my code as maybe this is wrong

DO wwSmtp
LOCAL loSmtp as wwSmtp
loSmtp = CREATEOBJECT("wwSmtp")

loSmtp.nMAILMODE = 2

loSmtp.cSubject = "Test Message through wwIPstuff"
loSmtp.cMessage = "This message contains rich text content as an alternate view"
loSmtp.cContentType = "text/plain"

*** create alternate view
LOCAL loAlternateView as wwSmtpAlternateView
loAlternateView = CREATEOBJECT("wwSmtpAlternateView")
loAlternateView.cText = "<b>Hello</b> world! <img src='cid:tcreminder' />"
loAlternateView.cContentType = "text/html"
loAlternateView.AddLinkedResource("c:\tcreminder.jpg","image/jpeg","tcreminder")

loSmtp.Addalternateview( loAlternateView )
*** Send it
llResult = loSmtp.Sendmail()


Error is generated in the loSmtp.Addalternateview line
the jpg is in the root of c:

Thanks for your help.

Jim


Make sure wwipstuff.dll is available...

If that doesn't work download a more recent version...

+++ Rick ---



i have used the example in the documentation but get the following error


Error 1754 Cannot find entry point SetClrVersion in the DLL.

Method setclrversion

Line 177

I am using version 5.55


Take a look at this help topic:

wcdocs:_2qm12el7y.htm

Note you have to use .NET mode for this to work - there's no support for embedded data in messages in classic mode.

+++ Rick ---


If I generate a report with jpg output from xfrx, how would I then insert the jpg in the body of an email that is send with sendemail()?


Thanks in advance.

Jim Day









Gravatar is a globally recognized avatar based on your email address. Re: Send Email with jpg in body
  Rick Strahl
  Jim Day
  Nov 7, 2014 @ 01:07am
Can you run the sample in wwipstuff_samples please and uncomment the attachment sample code? Fix up the sample so it uses your mail server and recipient settings and try that.

That sample works for me.

+++ Rick ---



I upgraded to the current version. The program runs through but the jpg does not display in outlook or google mail.

Just before the sendmail() function all the items are properly loaded as best I can tell.

not quite sure how I can tell that AddLinkedResource worked.

Jim


Don't know... make sure you use the latest version just to make sure... Also make sure that the file exists and that you have rights to it...

+++ Rick ---



wwipstuff is loading now. Think I had the wrong version.
Now I get error in wwdotnetbridge.invokemethod line 463

OLE IDispatch exception code 0 from mscorlib: Method 'System.DBNull.ContentId' not found...

This is my code as maybe this is wrong

DO wwSmtp
LOCAL loSmtp as wwSmtp
loSmtp = CREATEOBJECT("wwSmtp")

loSmtp.nMAILMODE = 2

loSmtp.cSubject = "Test Message through wwIPstuff"
loSmtp.cMessage = "This message contains rich text content as an alternate view"
loSmtp.cContentType = "text/plain"

*** create alternate view
LOCAL loAlternateView as wwSmtpAlternateView
loAlternateView = CREATEOBJECT("wwSmtpAlternateView")
loAlternateView.cText = "<b>Hello</b> world! <img src='cid:tcreminder' />"
loAlternateView.cContentType = "text/html"
loAlternateView.AddLinkedResource("c:\tcreminder.jpg","image/jpeg","tcreminder")

loSmtp.Addalternateview( loAlternateView )
*** Send it
llResult = loSmtp.Sendmail()


Error is generated in the loSmtp.Addalternateview line
the jpg is in the root of c:

Thanks for your help.

Jim


Make sure wwipstuff.dll is available...

If that doesn't work download a more recent version...

+++ Rick ---



i have used the example in the documentation but get the following error


Error 1754 Cannot find entry point SetClrVersion in the DLL.

Method setclrversion

Line 177

I am using version 5.55


Take a look at this help topic:

wcdocs:_2qm12el7y.htm

Note you have to use .NET mode for this to work - there's no support for embedded data in messages in classic mode.

+++ Rick ---


If I generate a report with jpg output from xfrx, how would I then insert the jpg in the body of an email that is send with sendemail()?


Thanks in advance.

Jim Day












Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Send Email with jpg in body
  n/a
  Rick Strahl
  Nov 7, 2014 @ 09:20am
In my code
loSmtp.nMAILMODE = 2 should have been 0

I cut and pasted my alternate code in your sample and it worked in .net mode which I thought I was using with the setting of 2 but it should be been a 0

Thanks for your help. Looks like I will have a new project to build now that this works.

Jim



Can you run the sample in wwipstuff_samples please and uncomment the attachment sample code? Fix up the sample so it uses your mail server and recipient settings and try that.

That sample works for me.

+++ Rick ---



I upgraded to the current version. The program runs through but the jpg does not display in outlook or google mail.

Just before the sendmail() function all the items are properly loaded as best I can tell.

not quite sure how I can tell that AddLinkedResource worked.

Jim


Don't know... make sure you use the latest version just to make sure... Also make sure that the file exists and that you have rights to it...

+++ Rick ---



wwipstuff is loading now. Think I had the wrong version.
Now I get error in wwdotnetbridge.invokemethod line 463

OLE IDispatch exception code 0 from mscorlib: Method 'System.DBNull.ContentId' not found...

This is my code as maybe this is wrong

DO wwSmtp
LOCAL loSmtp as wwSmtp
loSmtp = CREATEOBJECT("wwSmtp")

loSmtp.nMAILMODE = 2

loSmtp.cSubject = "Test Message through wwIPstuff"
loSmtp.cMessage = "This message contains rich text content as an alternate view"
loSmtp.cContentType = "text/plain"

*** create alternate view
LOCAL loAlternateView as wwSmtpAlternateView
loAlternateView = CREATEOBJECT("wwSmtpAlternateView")
loAlternateView.cText = "<b>Hello</b> world! <img src='cid:tcreminder' />"
loAlternateView.cContentType = "text/html"
loAlternateView.AddLinkedResource("c:\tcreminder.jpg","image/jpeg","tcreminder")

loSmtp.Addalternateview( loAlternateView )
*** Send it
llResult = loSmtp.Sendmail()


Error is generated in the loSmtp.Addalternateview line
the jpg is in the root of c:

Thanks for your help.

Jim


Make sure wwipstuff.dll is available...

If that doesn't work download a more recent version...

+++ Rick ---



i have used the example in the documentation but get the following error


Error 1754 Cannot find entry point SetClrVersion in the DLL.

Method setclrversion

Line 177

I am using version 5.55


Take a look at this help topic:

wcdocs:_2qm12el7y.htm

Note you have to use .NET mode for this to work - there's no support for embedded data in messages in classic mode.

+++ Rick ---


If I generate a report with jpg output from xfrx, how would I then insert the jpg in the body of an email that is send with sendemail()?


Thanks in advance.

Jim Day












© 1996-2024