FastFiber

Email zenden vanuit Visual lisp

Gestart door WebRacer, zo 26 06 2005, 22:28:54

Vorige topic - Volgende topic

WebRacer

:shock: hoi, ik heb hier een probleem, even kijken of er mensen zijn die dit weten....
ik wil vanuit visual lisp een email sturen maar dit schijnt niet goed te lukken weet er iemand hoe dit op te lossen,
ik had dit geschreven maar dit lukt echt niet...

;met wat hulp van David M. Stein
;probeerde ik dit
;CdLspOlivier = de tekst die ik wil verzenden

(defun sendmail (/ cdoMail)
(cond
   (
    (setq cdoMail (vlax-create-object "CONDTS.NewMail"))
    (vlax-put-property cdoMail 'From "xxx")
    (vlax-put-property cdoMail 'To "Olivier.Hautekeete@telenet.be")
    (vlax-put-property cdoMail 'Subject "Registratie Code Lisp")
    (vlax-put-property cdoMail 'Body CdLspOlivier)
    (vlax-put-property cdoMail 'Importance 1)
    (vlax-invoke-method cdoMail 'Send)
    (vlax-release-object cdoMail)
    (setq cdoMail nil)
   )
 )
 (princ)
)
?

Kenny H

Dag webracer,

Vanwaar wil jij uw email versturen? Vanuit autocad zelf of een ander programma?
Want dit is mogelijk met de Autocad 2002 versie.


CiteerStandard toolbar:

File Menu: eTransmit

Command line: etransmit

Creates a transmittal set of a drawing and related files.

The Create Transmittal dialog box includes the following tabs:

General
Files
Report
General Tab (Create Transmittal Dialog Box)
Creates a transmittal set of a specific type.

Notes
Provides a space where you can enter notes related to a transmittal set. The notes are included in the transmittal report. You can specify a template of default notes to be included with all your transmittal sets by creating an ASCII text file called etransmit.txt. This file must be saved to a location specified by the Support File Search Path option on the Files tab of the Options dialog box. See Report Tab (Create Transmittal Dialog Box), Files Tab (Options Dialog Box).

Type
Specifies the type of transmittal set created.

Folder

Creates a transmittal set of uncompressed files in a new or existing folder.

Self-extracting Executable

Creates a transmittal set of files as a compressed, self-extracting executable file. Double-clicking the resulting EXE file decompresses the transmittal set and restores the files.

Zip

Creates a transmittal set of files as a compressed zip file. To restore the files, you need a decompression utility such as the shareware application PKZIP or WinZip.

Password
Opens the Password dialog box, in which you can specify a password for your transmittal set.

Location
Specifies the location in which the transmittal set is created. Location lists the last ten locations in which transmittal sets were created. To specify a new location, choose Browse and navigate to the location you want.

Browse
Opens a standard file selection dialog box, in which you can navigate to a location where you create the transmittal set.

Convert Drawings To
Specifies the file format of all drawings included in a transmittal set. When this option is selected, you can select an AutoCAD drawing format from the drop-down list.

Preserve Directory Structure
Preserves the directory structure of all files in the transmittal set, facilitating ease of installation on another system. If this option is cleared, all files are installed to the target directory when the transmittal set is installed. This option is not available if you're saving a transmittal set to an Internet location.

Remove Paths from Xrefs and Images
Removes paths from any cross-referenced drawings or images in the transmittal set.

Send E-mail with Transmittal
Launches the default system email application when the transmittal set is created so that you can send an email notifying others of the new transmittal set.


Make Web Page Files
Generates a Web page that includes a link to the transmittal set.


Indien het met etransmit is kan ik er achter zoeken.

MVG

Kenny
8) Volvo 4 Life 8)

Kenny H

Citaat van: WebRacer
;met wat hulp van David M. Stein
;probeerde ik dit
;CdLspOlivier = de tekst die ik wil verzenden
(defun sendmail (/ cdoMail)
(cond
   (
    (setq cdoMail (vlax-create-object "CONDTS.NewMail"))

Hier loopt hij bij mij al vast.

Command: sendmail
; error: no function definition: VLAX-CREATE-OBJECT


    (vlax-put-property cdoMail 'From "xxx")
    (vlax-put-property cdoMail 'To "Olivier.Hautekeete@telenet.be")
    (vlax-put-property cdoMail 'Subject "Registratie Code Lisp")
    (vlax-put-property cdoMail 'Body CdLspOlivier)
    (vlax-put-property cdoMail 'Importance 1)
    (vlax-invoke-method cdoMail 'Send)
    (vlax-release-object cdoMail)
    (setq cdoMail nil)
   )
 )
 (princ)
)
8) Volvo 4 Life 8)

Kenny H

Nu heb ik wat verder gezocht.

Citeer(vlax-create-object "Excel.Application")

Moet gij ook eerst uw programma niet laten starten?

Citeer(setq cdoMail (vlax-create-object "outlook.Application"))
8) Volvo 4 Life 8)

HofCAD

Citaat van: Kenny H
;met wat hulp van David M. Stein
;probeerde ik dit
;CdLspOlivier = de tekst die ik wil verzenden
(defun sendmail (/ cdoMail)
(cond
   (
    (setq cdoMail (vlax-create-object "CONDTS.NewMail"))

Hier loopt hij bij mij al vast.

Command: sendmail
; error: no function definition: VLAX-CREATE-OBJECT
Beste Kenny,

Ik heb het probleem van WebRacer niet opgelost, maar jij moet
eerst :
(vl-load-com)
of
(if (car (atoms-family 1 '("vl-load-com")))
   (vl-load-com)
 )
gebruiken, om Visual lisp te laden.

Groetjes HofCAD CSI
ACADcadabra

Kenny H

Oké ik zal het eens uitproberen.

Bedankt HofCAD
8) Volvo 4 Life 8)

Kenny H

Weet er iemand hoe je outlook ed kunt opstarten via lisp?

Voor Word is het

Citeer(vl-load-com)
    (setq cdoMail (vlax-create-object "word.Application"))
    (vla-put-visible cdoMail :vlax-true)

Maar voor outlook is het dit NIET :!:

Citeer(vl-load-com)
    (setq cdoMail (vlax-create-object "outlook.Application"))
    (vla-put-visible cdoMail :vlax-true)
8) Volvo 4 Life 8)

HofCAD

ACADcadabra

Kenny H

Beste HofCAD

Ik heb mijn antwoord gevonden op Autodesk.
Nogmaals bedankt.
8) Volvo 4 Life 8)

Kenny H

(defun C:MAILTO ( / shell)
(setq shell
(vla-GetInterfaceObject
(vlax-get-acad-object)
"Shell.Application"
)
)
(vlax-invoke-method
Shell
'Open
"mailto:kenny.habils@skynet.com"
)
(vlax-release-object shell)
(PRIN1)
)
8) Volvo 4 Life 8)

Kenny H

Ik zal straks verder zoeken om dit

(vlax-put-property cdoMail 'To "Olivier.Hautekeete@telenet.be")
(vlax-put-property cdoMail 'Subject "Registratie Code Lisp")
(vlax-put-property cdoMail 'Body CdLspOlivier)
(vlax-put-property cdoMail 'Importance 1)

er in te krijgen.
8) Volvo 4 Life 8)

WebRacer

Schitterend, dit is echt wel prachtig hoe iedereen zo ter hulp snelt...
Thx gasten :shock:  :shock:
?

WebRacer

Met jullie hulp kwam ik reeds tot hier...
Nu zou enkel nog de mail moeten verzonden worden zonder dat de
gebruiker dit nog hoeft te doen... Als dat mogelijk is tenminste,
Maar ik Weet Dat Alles Mogelijk Is...
Door jullie zit ik al zover..

;met wat hulp van David M. Stein
;probeerde ik dit
;CdLspOlivier = de tekst die ik wil verzenden
(defun sendmail (/ Mail)
(cond
 (
  (setq mail (strcat "mailto:Olivier.Hautekeete@telenet.be"
          "?Subject=Dit is het onderwerp."
          "&body=" CdLspOlivier
         )
  )
  (setq IShell (vlax-create-object "Shell.Application.1"))
  (setq imail (vlax-invoke-method IShell "ShellExecute" mail))
  (vlax-release-object IShell)
 )
)
(princ)
)
?

julien

Citaat van: WebRacerNu zou enkel nog de mail moeten verzonden worden zonder dat de
gebruiker dit nog hoeft te doen... Als dat mogelijk is tenminste,
Ik ken de oplossing niet, maar ik denk wel dat je tegen een firewall gaat aanlopen.

HofCAD

Citaat van: WebRacerMet jullie hulp kwam ik reeds tot hier...
Nu zou enkel nog de mail moeten verzonden worden zonder dat de
gebruiker dit nog hoeft te doen... Als dat mogelijk is tenminste,
Maar ik Weet Dat Alles Mogelijk Is...
Door jullie zit ik al zover..

;met wat hulp van David M. Stein
;probeerde ik dit
;CdLspOlivier = de tekst die ik wil verzenden
(defun sendmail (/ Mail)
(cond
 (
  (setq mail (strcat "mailto:Olivier.Hautekeete@telenet.be"
          "?Subject=Dit is het onderwerp."
          "&body=" CdLspOlivier
         )
  )
  (setq IShell (vlax-create-object "Shell.Application.1"))
  (setq imail (vlax-invoke-method IShell "ShellExecute" mail))
  (vlax-release-object IShell)
 )
)
(princ)
)

Beste Lezers,

Weet een van U wat  ik bij "Microsoft Windows NT Version 4.0 (x86)" moet veranderen in de regel:
  (setq IShell (vlax-create-object "Shell.Application.1"))
Bij voorbaat mijn dank.

Groetjes HofCAD CSI

PS1 Ik heb een leuke Lisp gevonden om Google met zoektermen
     op te starten.


(defun C:Google(/ term termlist)
(defun plusify (str / n)
(while (setq n (vl-string-search " " str))
(setq str (vl-string-subst "+" " " str n)))
str)
;;usage: (google '("unwind skipped on exception"))
(defun GoogleSub (TermList / UrlStr)
(setq UrlStr
(strcat "http://groups.google.com/groups?q="
"group%3Aautodesk.autocad.customization"))
(foreach term termlist
(setq UrlStr
(strcat UrlStr "+%22" (plusify term) "%22")))
(setq UrlStr (strcat UrlStr "&ie=UTF-8&oe=UTF-8&hl=en"))
(command "BROWSER" UrlStr))
(while
(not(= "" (setq term(getstring"\nEnter search term or to finalize
"))) )
(setq termlist(cons term termlist))
)
(GoogleSub termlist)
)

PS2 Door het gebruik van deze Lisp, heb ik al heel wat gevonden over
het verzenden van een Email met AutoCAD.
Maar door het bovenstaande probleem en ook dat ik niet werk met
MS Outlook(maar met webmail), heb ik nog niets werkend gekregen.
Op http://www.autocadforum.nl kun je zien wat ik verzameld heb.

http://www.autocadforum.nl/forum/viewtopic.php?p=2458#2458
ACADcadabra

FastFiber