GroupBrowser  




Go Back   GroupBrowser > Novell Newsgroups > Groupwise > Groupwise 6x Client Support
User Name
Password
 
 
Thread Tools Search this Thread Display Modes

Sending mail as attachment with toolbar in Groupwise
Old 12-01-2008, 07:06 AM #1
testsc0
Guest
 
Status:
Posts: n/a
Default Sending mail as attachment with toolbar in Groupwise


I need to create a toolbar button that can be used to send the selected
mail as attachment and the specific string from header of selected mail
in body.

I've created a sample button by using C3PO wizard and also created a
function that can send a mail to some email address. But facing the
problem:
The mail is sent to the specified address but when checked in groupwise
mail client, then the copy of mail can be seen in trash folder with no
To address and a copy in the 'Sent Mail' folder but delivered status as
pending.

The code used to send the mail is as below:

Code:
--------------------


Sub send_mail()
Try
Dim strFrom, strSubject, strBody
Dim objGW As GroupwareTypeLibrary.Application

strSubject = "Subject Text"
strBody = "Body text." & Chr(10) & Chr(10) & _
Chr(9) & "This text will be separated by returns and a tab."

objGW = DirectCast(CreateObject("NovellGroupWareSession"), GroupwareTypeLibrary.Application)

With objGW
With .Login
With .MailBox.Messages.Add(Class:="GW.MESSAGE.MAIL", Type:=GroupwareTypeLibrary.MessageBoxTypeConstants .egwDraft)
.Subject.PlainText = strSubject
.BodyText.PlainText = strBody
.Sender.EMailAddress = "sender@mailserver.com"
'.Attachments.Add("C:\File_Name.xls")
'.Sender.EMailAddress = "<sender@mailserver.com>" 'line not working
.Recipients.Add("<targetemail@mailserver.com>", , GroupwareTypeLibrary.AddressTargetTypeConstants.eg wTo)
'.Recipients.Resolve()
.Send()
.Refresh()
End With
End With
.Quit()
End With
objGW = Nothing
MsgBox("Email has been sent!", vbInformation, "Email Notification")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

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

Also
-Also please help me how I can get the selected mail from the client
window?
- How I can send the selected mail as attachment?
- How I can get the mail header from the selected mail? presently I'm
using the following code:

Code:
--------------------


Private Sub mailAttachments()
Dim objGW As GroupwareTypeLibrary.Application
Dim objMail As GroupwareTypeLibrary.Mail
objGW = DirectCast(CreateObject("NovellGroupWareSession"), GroupwareTypeLibrary.Application)
With objGW
With .Login
For Each objMail In .AllFolders.ItemByName("MailBox").Messages

With objMail
If .Attachments.Count > 0 Then
For i As Integer = 1 To .Attachments.Count
If Right(.Attachments().Item(i).fileName, 8) = "Mime.822" Then
'Read attachment
.Attachments().Item(i).Save("C:\GWAttachmentTest\" & .Attachments().Item(i).fileName)
Dim arrList As New ArrayList
arrList.AddRange(File.ReadAllLines("C:\GWAttachmentTest\" & objMail.Attachments().Item(i).fileName))
File.Delete("C:\GWAttachmentTest\" & objMail.Attachments().Item(i).fileName)
Dim msg As String = String.Empty
For Each curL As String In arrList
msg = msg & vbCrLf & curL
Next
MsgBox(msg)
End If
Next
End If
End With
Next
End With
End With
End Sub


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


But this code also includes the subject line and also body line. which
slower s the processing.

Please help me, its very urgent. I'm trying from long time to find the
solution but have no clear solution yet. Please help me to sort out the
issues.......


--
testsc0
------------------------------------------------------------------------
testsc0's Profile: http://forums.novell.com/member.php?userid=28582
View this thread: http://forums.novell.com/showthread.php?t=352498

  Reply With Quote

Re: Sending mail as attachment with toolbar in Groupwise
Old 12-01-2008, 07:46 AM #2
testsc0
Guest
 
Status:
Posts: n/a
Default Re: Sending mail as attachment with toolbar in Groupwise


I think I've posted in wrong place please anybody provide me the correct
location or please move the message to the correct forum.


--
testsc0
------------------------------------------------------------------------
testsc0's Profile: http://forums.novell.com/member.php?userid=28582
View this thread: http://forums.novell.com/showthread.php?t=352498

  Reply With Quote

Re: Sending mail as attachment with toolbar in Groupwise
Old 12-01-2008, 07:46 AM #3
testsc0
Guest
 
Status:
Posts: n/a
Default Re: Sending mail as attachment with toolbar in Groupwise


I think I've posted in wrong place please anybody provide me the correct
location or please move the message to the correct forum.


--
testsc0
------------------------------------------------------------------------
testsc0's Profile: http://forums.novell.com/member.php?userid=28582
View this thread: http://forums.novell.com/showthread.php?t=352498

  Reply With Quote

Re: Sending mail as attachment with toolbar in Groupwise
Old 12-01-2008, 11:33 AM #4
Tommy Mikkelsen
Guest
 
Status:
Posts: n/a
Default Re: Sending mail as attachment with toolbar in Groupwise

testsc0 wrote:

>
> I think I've posted in wrong place please anybody provide me the
> correct location or please move the message to the correct forum.


novell.devsup.gwobjapi and novell.devsup.gwc3po

However, they are not accessed from the web....

You'll need a real newsreader, like the GW Client, and direct it to
forums.novell.com

--
Tommy Mikkelsen
IT Quality A/S, Denmark
Novell Support Forums SYSOP

Sorry, but no support through email
Be a GroupWiseR, go http://www.groupwiser.net
  Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes





Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump




Adobe Newsgroups | Software Newsgroups


Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2003-2004 All Rights Reserved GroupBrowser LLC.