-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/util/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyc

ó
î:ïNc@@sñdZddlmZddlZddlTeZeZeeƒZ	dZ
dZeZdZ
dZeZdZd	Zd
ZdZdZd
ZdZdZdZdZdZdZdZdZdZdZdZ e Z!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*de+fd„ƒYZ,ee,ƒZ-ee-ƒZ.d e+fd!„ƒYZ/ee/ƒZ0d"e+fd#„ƒYZ1ee1ƒZ2e3j4Z5e5j6Z6ee6_7eee2eefe6_8e5j9Z9ee9_7eee:eee.fe9_8e5j;Z;ee;_7e<fe;_8e5j=Z=ee=_7ee:e:eee	fe=_8e5j>Z>ee>_7eeeefe>_8d$e?fd%„ƒYZ@ddd&„ZBd'„ZCd(„ZDd)„ZEd*d*d*d+„ZFeGd,kríddlHZHd-ZId.ZJd/ZKeHjLdZMeFeIeJeKeMƒndS(0sŠ
Copyright (c) 2007 Ian Cook and John Popplewell

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Date    : 11 August 2007
Version : 1.0.1
Contact : John Popplewell
Email   : john@johnnypops.demon.co.uk
Web     : http://www.johnnypops.demon.co.uk/python/
Origin  : Based on the original script by Ian Cook
          http://www.kirbyfooty.com/simplemapi.py
Comments: Works (and tested) with:
          Outlook Express, Outlook 97 and 2000,
          Eudora, Incredimail and Mozilla Thunderbird (1.5.0.2)
Thanks  : Werner F. Bruhin and Michele Petrazzo on the ctypes list.

If you have any bug-fixes, enhancements or suggestions regarding this
software, please contact me at the above email address.
i(tabsolute_importN(t*iiiiiiii	i
iii
iiiiiiiiiiiiit
MapiRecipDesccB@sDeZdefdefdefdefdefdefgZRS(t
ulReservedtulRecipClasstlpszNametlpszAddresst	ulEIDSizet	lpEntryID(t__name__t
__module__tc_ulongtc_char_ptc_void_pt_fields_(((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyRUs					tMapiFileDesccB@sDeZdefdefdefdefdefdefgZRS(RtflFlagst	nPositiontlpszPathNametlpszFileNamet
lpFileType(R	R
RRR
R(((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyRas					tMapiMessagec
B@szeZdefdefdefdefdefdefdefdefdefd	efd
efdefgZRS(RtlpszSubjecttlpszNoteTexttlpszMessageTypetlpszDateReceivedtlpszConversationIDRtlpOriginatortnRecipCounttlpRecipst
nFileCounttlpFiles(R	R
RRtFLAGStlpMapiRecipDesctlpMapiFileDescR(((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyRls											t	MAPIErrorcB@seZd„Zd„ZRS(cC@stj|ƒ||_dS(N(tWindowsErrort__init__tcode(tselfR&((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyR%•s
cC@sd|jfS(Ns
MAPI error %d(R&(R'((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyt__str__™s(R	R
R%R((((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyR#“s	cC@sFtƒ}td||tdt|ƒƒ}|tkrBt|‚n|S(Ni(tLHANDLEt	MAPILogont
MAPI_LOGON_UItbyreftSUCCESS_SUCCESSR#(tprofileNametpasswordtpSessiontrc((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyt_logons
	!cC@s1t|dddƒ}|tkr-t|‚ndS(Ni(t
MAPILogoffR-R#(tsessionR1((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyt_logoff¥scC@sŒtƒ}t|d|ddt|ƒƒ}|tkrBt|‚n|j}|j|j}}t|ƒ}|tkr‚t|‚n||fS(Ni(	R!tMAPIResolveNameR,R-R#tcontentsRRtMAPIFreeBuffer(R4tnamet
pRecipDescR1trdtaddress((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyt_resolveName«s	!	c
C@sÁt|ƒ}|rŠtt|ƒ}|ƒ}xSt||ƒD]B\}}	d|_d|_d|_|	|_d|_d|_	q;W|}
n	t
ƒ}
|jdƒ}t|ƒ}tt|ƒ}
|
ƒ}x‡t||ƒD]v\}}d|_t
|_yt||ƒ\|_|_Wn$tk
r:d||_|_nXd|_d|_q×W|}td||ddddtƒ||||
ƒ}t|dt|ƒtdƒ}|tkr½t|‚ndS(Niiÿÿÿÿt;(tlenRtzipRRRRtNoneRRR"tsplitRtMAPI_TORR=RRR$RRRR!tMAPISendMailR,tMAPI_DIALOGR-R#(R4t	recipienttsubjecttbodytattachRtMapiFileDesc_AtfdatfdtfaRt	RecipWorktRecipCnttMapiRecipDesc_AtrdaR;tratreciptmsgR1((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyt	_sendMail¸sB						
					
	
tc	C@s³g}|jdƒ}x0|D](}tjj|ƒr|j|ƒqqWttjj|ƒ}tjƒ}z5tƒ}zt	|||||ƒWdt
|ƒXWdtj|ƒXdS(s/Post an e-mail message using Simple MAPI

    recipient - string: address to send to (multiple addresses separated with a semicolon)
    subject   - string: subject header
    body      - string: message text
    attach    - string: files to attach (multiple attachments separated with a semicolon)
    R>N(RBtostpathtexiststappendtmaptabspathtgetcwdR2RUR5tchdir(	RFRGRHtattachfilesRIt
AttachWorktfiletrestoreR4((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pytSendMailás	
	t__main__stest@johnnypops.demon.co.uksTest Message Subjects6Hi,

this is a quick test message,

cheers,
John.(Nt__doc__t
__future__RRWtctypesRR R)tPOINTERt	LPLHANDLER-tMAPI_USER_ABORTtMAPI_E_USER_ABORTtMAPI_E_FAILUREtMAPI_E_LOGON_FAILUREtMAPI_E_LOGIN_FAILUREtMAPI_E_DISK_FULLtMAPI_E_INSUFFICIENT_MEMORYtMAPI_E_ACCESS_DENIEDtMAPI_E_TOO_MANY_SESSIONStMAPI_E_TOO_MANY_FILEStMAPI_E_TOO_MANY_RECIPIENTStMAPI_E_ATTACHMENT_NOT_FOUNDtMAPI_E_ATTACHMENT_OPEN_FAILUREtMAPI_E_ATTACHMENT_WRITE_FAILUREtMAPI_E_UNKNOWN_RECIPIENTtMAPI_E_BAD_RECIPTYPEtMAPI_E_NO_MESSAGEStMAPI_E_INVALID_MESSAGEtMAPI_E_TEXT_TOO_LARGEtMAPI_E_INVALID_SESSIONtMAPI_E_TYPE_NOT_SUPPORTEDtMAPI_E_AMBIGUOUS_RECIPIENTtMAPI_E_AMBIG_RECIPtMAPI_E_MESSAGE_IN_USEtMAPI_E_NETWORK_FAILUREtMAPI_E_INVALID_EDITFIELDStMAPI_E_INVALID_RECIPStMAPI_E_NOT_SUPPORTEDt	MAPI_ORIGRCR+REt	StructureRR!tlppMapiRecipDescRR"Rt
lpMapiMessagetwindlltmapi32tMAPIRDtrestypetargtypesR6RR8R
R*R3R$R#RAR2R5R=RURcR	tsysRFRGRHtargvt
attachment(((s:/usr/lib/python2.7/dist-packages/bzrlib/util/simplemapi.pyt<module>%s–
													
		
	)


Copyright © 2017 || Recoded By Mr.Bumblebee