Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

trying to attach file to email

3 posts in Pocket PowerBuilder Last posting was on 2010-02-10 00:50:34.0Z
Mike T Posted on 2010-02-09 04:26:34.0Z
From: Mike T <mtrainor@applisoft.com>
Newsgroups: sybase.public.pocketpowerbuilder
Subject: trying to attach file to email
Date: Mon, 8 Feb 2010 20:26:34 -0800 (PST)
Organization: http://groups.google.com
Lines: 32
Message-ID: <5dccfc19-5401-4a64-8da9-1ea60c9769a2@u9g2000yqb.googlegroups.com>
NNTP-Posting-Host: 76.66.191.53
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1265689594 21336 127.0.0.1 (9 Feb 2010 04:26:34 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 9 Feb 2010 04:26:34 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: u9g2000yqb.googlegroups.com; posting-host=76.66.191.53; posting-account=3Bl5BwoAAABnJFsVNBfvu7_L8SFhxN7F
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!news-raspail.gip.net!news.gsl.net!gip.net!aotearoa.belnet.be!news.belnet.be!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!postnews.google.com!u9g2000yqb.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.pocketpowerbuilder:12159
Article PK: 262031

I'm trying to attach a file to an email. The email it self works fine,
but the file is not attached. I've found a few samples on the web, but
none actually work.

here's my code.
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
mailFileDescription mAttach

// Create a mail session
mSes = create mailSession
// Log on to the session
mRet = mSes.mailLogon(mailNewSession!)
IF mRet = mailReturnSuccess! THEN
// Populate the mailMessage structure
mMsg.Subject = "Mobile Order"
mMsg.NoteText = "New Sales Order " + String(gl_current_order)
mMsg.Recipient[1].name = ProfileString(gs_ini_filename,"Defaults",
"Email To Address", "")

mAttach.Filename = is_filename
mAttach.Pathname = ""
mAttach.FileType = mailAttach!
mAttach.Position = len(mMsg.NoteText) + 1
mMsg.AttachmentFile[ 1 ] = mAttach
// Send the mail
mSes.mailSend(mMsg)

I sure would appreciate it if someone could spot the problem.

Mike


Mike T Posted on 2010-02-10 00:50:34.0Z
From: Mike T <mtrainor@applisoft.com>
Newsgroups: sybase.public.pocketpowerbuilder
Subject: Re: trying to attach file to email
Date: Tue, 9 Feb 2010 16:50:34 -0800 (PST)
Organization: http://groups.google.com
Lines: 41
Message-ID: <ff5c9ea2-8c2f-49b0-9f78-c05f47c0d14d@19g2000yql.googlegroups.com>
References: <5dccfc19-5401-4a64-8da9-1ea60c9769a2@u9g2000yqb.googlegroups.com>
NNTP-Posting-Host: 76.66.191.53
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1265763034 15285 127.0.0.1 (10 Feb 2010 00:50:34 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 10 Feb 2010 00:50:34 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 19g2000yql.googlegroups.com; posting-host=76.66.191.53; posting-account=3Bl5BwoAAABnJFsVNBfvu7_L8SFhxN7F
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!news-raspail.gip.net!news.gsl.net!gip.net!aotearoa.belnet.be!news.belnet.be!ecngs!feeder.ecngs.de!feeder.news-service.com!postnews.google.com!19g2000yql.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.pocketpowerbuilder:12163
Article PK: 262028

Got it.

The filename was not properly set. And the pointer is not needed.

On Feb 8, 11:26 pm, Mike T <mtrai...@applisoft.com> wrote:
> I'm trying to attach a file to an email. The email it self works fine,
> but the file is not attached. I've found a few samples on the web, but
> none actually work.
>
> here's my code.
>                    mailSession mSes
>         mailReturnCode mRet
>         mailMessage mMsg
>         mailFileDescription mAttach
>
>         // Create a mail session
>         mSes = create mailSession
>         // Log on to the session
>         mRet = mSes.mailLogon(mailNewSession!)
>         IF mRet = mailReturnSuccess! THEN
>         // Populate the mailMessage structure
>         mMsg.Subject = "Mobile Order"
>         mMsg.NoteText = "New Sales Order " + String(gl_current_order)
>         mMsg.Recipient[1].name = ProfileString(gs_ini_filename,"Defaults",
> "Email To Address", "")
>
>         mAttach.Filename = is_filename
>         mAttach.Pathname = ""
>         mAttach.FileType = mailAttach!
>         mAttach.Position = len(mMsg.NoteText) + 1
>         mMsg.AttachmentFile[ 1 ] = mAttach
>         // Send the mail
>         mSes.mailSend(mMsg)
>
> I sure would appreciate it if someone could spot the problem.
>
> Mike


Bruce Armstrong Posted on 2010-02-09 14:49:14.0Z
From: Bruce Armstrong <NOCANSPAM_bruce.armstrong@yahoo.com>
Newsgroups: sybase.public.pocketpowerbuilder
Subject: Re: trying to attach file to email
Reply-To: NOCANSPAM_bruce.armstrong@yahoo.com
Message-ID: <bet2n5d0rlbcok32usl5d9hheui87b0hp0@4ax.com>
References: <5dccfc19-5401-4a64-8da9-1ea60c9769a2@u9g2000yqb.googlegroups.com>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 9 Feb 2010 06:49:14 -0800
X-Trace: forums-1-dub 1265726954 10.22.241.152 (9 Feb 2010 06:49:14 -0800)
X-Original-Trace: 9 Feb 2010 06:49:14 -0800, vip152.sybase.com
Lines: 49
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.pocketpowerbuilder:12161
Article PK: 262029

The pathname is blank? How will the application know where to find
the file to attach it.

On Mon, 8 Feb 2010 20:26:34 -0800 (PST), Mike T

<mtrainor@applisoft.com> wrote:

>I'm trying to attach a file to an email. The email it self works fine,
>but the file is not attached. I've found a few samples on the web, but
>none actually work.
>
>here's my code.
> mailSession mSes
> mailReturnCode mRet
> mailMessage mMsg
> mailFileDescription mAttach
>
> // Create a mail session
> mSes = create mailSession
> // Log on to the session
> mRet = mSes.mailLogon(mailNewSession!)
> IF mRet = mailReturnSuccess! THEN
> // Populate the mailMessage structure
> mMsg.Subject = "Mobile Order"
> mMsg.NoteText = "New Sales Order " + String(gl_current_order)
> mMsg.Recipient[1].name = ProfileString(gs_ini_filename,"Defaults",
>"Email To Address", "")
>
> mAttach.Filename = is_filename
> mAttach.Pathname = ""
> mAttach.FileType = mailAttach!
> mAttach.Position = len(mMsg.NoteText) + 1
> mMsg.AttachmentFile[ 1 ] = mAttach
> // Send the mail
> mSes.mailSend(mMsg)
>
>I sure would appreciate it if someone could spot the problem.
>
>Mike

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong