Sign in to follow this  
Followers 0
Hello Me You

_INetSmtpMail

12 posts in this topic

I have a GUI that has some inputs for $s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress ,$s_Subject but I have and an input for $as_Body. The input is:

GUICtrlCreateInput("", 140, 60, 295, 120, BitOR($ES_MULTILINE,$ES_WANTRETURN))oÝ÷ Ù:,zwmé[a­ì,ÚmêÞƺÛh«­¢+ØÀÌØíѹ}½¬ôÕ¥
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí=,ÅÕ½Ðì°ÌÔÀ°ÄäÀ°àÔ°ÐÀ¤oÝ÷ Ø Ý§Ê'$¶ºÛh«­¢+Ù
ÍÀÌØíµÍôÀÌØíѹ}½¬($$ÀÌØíÍ}MµÑÁMÉÙÈôU%
ÑɱI ÀÌØí¥¹}͵ÑÀ¤($$ÀÌØíÍ}ɽµ9µôÅÕ½Ðíµ5¥0ÅÕ½Ðì($$ÀÌØíÍ}ɽµÉÍÌôU%
ÑɱI ÀÌØí¥¹}ɽ´¤($$ÀÌØíÍ}Q½ÉÍÌôU%
ÑɱI ÀÌØí¥¹}Ѽ¤($$ÀÌØíÍ}MÕ©ÐôU%
ÑɱI ÀÌØí¥¹}ÍթФ($$ÀÌØíÍ}   ½äôU%
ÑɱI ÀÌØí¥¹}ÑáФ($$ÀÌØí͵ÑÀô}%9ÑMµÑÁ5¥° ÀÌØíÍ}MµÑÁMÉÙÈ°ÀÌØíÍ}ɽµ9µ°ÀÌØíÍ}ɽµÉÍÌ°ÀÌØíÍ}Q½ÉÍÌ°ÀÌØíÍ}MթаÀÌØíÍ} ½ä¤($$ÀÌØíÉÈôÉɽÈ($%%ÀÌØí͵ÑÀôÄQ¡¸($$%5Í ½à À°ÅÕ½ÐíMÕÍÌÅÕ½Ðì°ÅÕ½Ðí5¥°Í¹ÐÌÌìÅÕ½Ðì¤($%±Í($$%5Í ½à À°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½Ðí5¥°¥±Ý¥Ñ ÉɽȽèÅÕ½ÐìµÀìÀÌØíÉȤ($%¹%

The mail goes normally but I can't see any text in the mail.. Is the problem that the input for the $as_Body is more than one line? (multiline)


Random

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

The problem comes from your gui. You need to publish the entire code and not a part and after we can help you

Edited by LOULOU

Share this post


Link to post
Share on other sites

I don't want to give the whole script.. Do you want a Print Screen?

I can't help you if you don't give the source. Maybe you can send me a private message. For myself i use _inetsmptmail in a complex programm and it works well even with GMAIL

Share this post


Link to post
Share on other sites

line 200

what????

Random

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

what????

How in gods name can you expect a reasonable answer without showing a proper script to test and any proper info about the results of the debugging you have done. Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

;==============================================================================

#include <GuiConstants.au3>
#include <INet.au3>

;==============================================================================

#NoTrayIcon

;==============================================================================

$password = "adcx"
$in_pass = InputBox("Password required", "Please enter password:", "", "*")
If @error Then Exit
If $in_pass <> $password Then
    MsgBox(16, "ERROR", "Wrong password!")
    Exit
EndIf

;==============================================================================

HotKeySet("^!h", "_hide")
HotKeySet("^!u", "_unhide")
HotKeySet("^!#x", "_exit")

Func _hide()
    GUISetState(@SW_HIDE)
EndFunc   ;==>_hide

Func _unhide()
    GUISetState(@SW_SHOW)
EndFunc   ;==>_unhide

Func _exit()
    If MsgBox(4, "Exit Script", "Are you sure?") = 6 Then Exit
EndFunc   ;==>_exit

;==============================================================================

Opt("GUICloseOnESC", 0)

GUICreate("Fake Mailer", 445, 240, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
GUISetBkColor(0x0080FF)
GUISetState(@SW_HIDE)

;==============================================================================

$lbl_info = GUICtrlCreateLabel("Complete the form and click ok.", 10, 10, 310, 20)

$lbl_from = GUICtrlCreateLabel("Send from:", 10, 40, 51, 20)
$lbl_to = GUICtrlCreateLabel("Send to:", 10, 90, 40, 20)
$lbl_subject = GUICtrlCreateLabel("Subject:", 10, 140, 38, 20)
$lbl_text = GUICtrlCreateLabel("Text:", 140, 40, 23, 20)
$lbl_smtp = GUICtrlCreateLabel("ISP Smtp:", 10, 190, 47, 20)

;==============================================================================

$in_from = GUICtrlCreateInput("", 10, 60, 120, 20)
GUICtrlSetTip($in_from, "E-mail address that you" & @CRLF & "want to send the mail from.", "Help")

$in_to = GUICtrlCreateInput("", 10, 110, 120, 20)
GUICtrlSetTip($in_to, "Recipient e-mail address" & @CRLF & "that you want to send the mail.", "Help")

$in_subject = GUICtrlCreateInput("", 10, 160, 120, 20)
GUICtrlSetTip($in_subject, "The subject of your mail.", "Help")

$in_text = GUICtrlCreateInput("", 140, 60, 295, 120, BitOR($ES_MULTILINE, $ES_WANTRETURN))
GUICtrlSetTip($in_text, "The text of your mail.", "Help")

$in_smtp = GUICtrlCreateInput("", 10, 210, 120, 20)
GUICtrlSetTip($in_smtp, "Your ISP smtp address.", "Help")

;==============================================================================

$btn_help = GUICtrlCreateButton("Help", 80, 188, 50, 20)

$btn_info = GUICtrlCreateButton("Info", 140, 190, 85, 40)
$btn_about = GUICtrlCreateButton("About", 245, 190, 85, 40)

$btn_ok = GUICtrlCreateButton("OK", 350, 190, 85, 40)

;==============================================================================

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $btn_help
            MsgBox(64, "ISP (Internet Service Provider) smtp", "Enter your ISP smtp address." & @CRLF & "There are 3 ways to find your ISP address:" & @CRLF & @CRLF & "1) Call your ISP and ask them what is the smtp address." & @CRLF & "If they ask you why do you need it, say that you want" & @CRLF & "to setup an e-mail account and you need the smtp address" & @CRLF & @CRLF & "2) If you already have an e-mail account from your ISP," & @CRLF & "open MS Outlook, go to Tools > E-mail Accounts and from" & @CRLF & "the settings you can see the smtp address." & @CRLF & @CRLF & "3) Go to your ISP website, from the site menu," & @CRLF & "go to [Contact Us] or [Help and Support]. There they usually" & @CRLF & "have the smtp address.")
        Case $msg = $btn_info
            MsgBox(0, "Info", "Function" & @TAB & @TAB & "Hotkey" & @CRLF & "¯¯¯¯¯¯¯" & @TAB & @TAB & "¯¯¯¯¯¯" & @CRLF & "Hide Window" & @TAB & "Ctrl+Alt+H" & @CRLF & "Unhide Window" & @TAB & "Ctrl+Alt+U" & @CRLF & "Exit Script" & @TAB & @TAB & "Ctrl+Alt+Win+X" & @CRLF & @CRLF & "Note:" & @CRLF & "After clicking OK button you have" & @CRLF & "to wait for few seconds." & @CRLF & "Hotmail (name@hotmail.com) accounts" & @CRLF & "maybe don't work")
        Case $msg = $btn_about
            MsgBox(0, "About", "Fake Mailer" & @CRLF & "Send emails with any email address." & @CRLF & "________________________" & @CRLF & "[ Made by miLl3niUm_h4ck3r ]" & @CRLF & "¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯" & @CRLF & "-AdC-x Team" & @CRLF & "http://www.adcx.co.nr")
        Case $msg = $btn_ok
            $s_SmtpServer = GUICtrlRead($in_smtp)
            $s_FromName = "E-MaiL"
            $s_FromAddress = GUICtrlRead($in_from)
            $s_ToAddress = GUICtrlRead($in_to)
            $s_Subject = GUICtrlRead($in_subject)
            $as_Body = GUICtrlRead($in_text)
            $smtp = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
            $err = @error
            If $smtp = 1 Then
                MsgBox(0, "Success", "Mail sent!")
            Else
                MsgBox(0, "Error", "Mail failed with error code: " & $err)
            EndIf
    EndSelect
WEnd
Exit

;==============================================================================


Random

Share this post


Link to post
Share on other sites

The body should be an Array as per the Helpfile:

$as_Body [optional] The body of the email as a single dimensional array of strings. Each value in the array will be terminated with a @CRLF in the email.

so something like this should work:

$as_Body = StringSplit(GUICtrlRead($in_text),@CRLF)
            $as_Body[0]="" ; replace the number with space

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Well, I tried this:

$s_SmtpServer = GUICtrlRead($in_smtp)
            $s_FromName = "E-MaiL"
            $s_FromAddress = GUICtrlRead($in_from)
            $s_ToAddress = GUICtrlRead($in_to)
            $s_Subject = GUICtrlRead($in_subject)
            $as_Body = StringSplit(GUICtrlRead($in_text), @CRLF)
            $as_Body[0] = ""
            $smtp = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)

In the window input (for the text), I typed:

line 1
line 2
line 3

The email sent and there was and text but the text look like:

line 1

line 2

line 3

Random

Share this post


Link to post
Share on other sites

Already to the 3rd page..


Random

Share this post


Link to post
Share on other sites

You guys answered many of my questions. What's the problem now?


Random

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

he means its an array ...as in insert it like this $a_body[5]="hai my name is fred","etc","etc","etc","etc" ;<-five lines..

so if you would like to send a text from a text file I suggest using a loop and adding one by one.

Edited by Misha

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0