Could we see the exact error message?
Ok so to simplify this and make it hopefully easy to answer, i need to send an email via a program to a certain email adress, i need to be able to change it remotely so on my server i have a .txt file which contains the email i want to send the email too. But when i run my program it says "this string is not a valid" or something. I checked to make sure it dl's the right text file and it does and the email sender works if u put in ur own location but it doesnt like using the external .txt file for some reason...
any help?
Could we see the exact error message?
What part isn't working now, I didn't get it o_O.
[php]Dim wc as new net.webclient
Dim email as string = wc.downloadstring(url)
msgbox(email)
[/php]
proper result?
let me see your source and error please
~Mohandas GandhiA man is but the product of his thoughts what he thinks, he becomes.
~ ImmortalA Genius is nothing with out an idea, An idea is always an idea even without a genius.
Well, without any actual code provided, there's not a lot of things we can suggest. The most likely problem is that you're incorrectly downloading the string. Post your download method here so we can see if that's the problem, or PM me.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Send the code to jason, he is more helpful then cosconub. I vouch you send to jason. No offense cosconub
Ok heres the source code:
Code:Private Sub Emaillocation() Dim Target As String Target = "http:/**********/*****/Target.txt" Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(Target) Dim response As System.Net.HttpWebResponse = request.GetResponse() Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("windows-1252")) Dim Targettxt As String Targettxt = sr.ReadToEnd() TargetX.Text = Targettxt Call email() End Sub Private Sub email() Dim AnEmailMessage As New MailMessage AnEmailMessage.From = New MailAddress("************@gmail.com") AnEmailMessage.To.Add(TargetX.Text) 'ERROR HERE AnEmailMessage.Subject = ("**************") AnEmailMessage.Body = ("*****************************") Dim SimpleSMTP As New SmtpClient("smtp.gmail.com") SimpleSMTP.Port = 587 SimpleSMTP.EnableSsl = True SimpleSMTP.Credentials = New System.Net.NetworkCredential("**************@gmail.com", "******") SimpleSMTP.Send(AnEmailMessage) End Sub
The error occurs when sending the email, i can get the entire error if need be but im very tired right now and am going to bed, will check in morning
* = hidden for safety reasons
Last edited by Bombsaway707; 01-02-2011 at 09:20 PM.
Have you tried putting a breakpoint at that line and checking what value "targetX.Text" holds?
Also, try changing which encoding you use when downloading. UTF8 is a pretty common one.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Im not concerned about UTF8 solving his problems, it's just I'm not too savvy with:
It probably isn't the problem, but using a predefined encoding set would make things a bit more controlled til the error IS found.Code:System.Text.Encoding.GetEncoding("windows-1252")
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
1st there's no point of redefining encoding unless you know what exactly the encoding is used, plus I don't think there's a problem with encoding.
I think there's some null character or something like whitespaces in the Target file. Happened to my once. Try trimming it manually or via VB:
[php]Sub Emaillocation()
Dim Target As String
Target = "http:/**********/*****/Target.txt"
Dim wc as new net.webclient
Dim ID as string = wc.downloadstring(Target)
ID = ID.Trim
TargetX.Text = ID
End Sub[/php]Try it.
Last edited by Hassan; 01-03-2011 at 09:06 AM.
did you inport net?
and btw oO that really hurt me deep man,
~Mohandas GandhiA man is but the product of his thoughts what he thinks, he becomes.
~ ImmortalA Genius is nothing with out an idea, An idea is always an idea even without a genius.
Make a label, visible = false, make the text of the label remote (heres a link) then just set the email to label1.Text
(Change the .txt online to the email that you want it to send it.)
As simple as that, it would take 15 mins MAX
Code:Looking for some project(s) to dedicate my time to! I know HTML, PHP, MySQL and JavaScript. - Message me if I can help you with something, all I want is some credit!
Hmmm, if error message is on sending, then try SMTP port 465