It is currently Sun Apr 22, 2018 7:24 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 370 posts ]  Go to page Previous  1 ... 21, 22, 23, 24, 25
Author Message
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Fri Oct 11, 2013 7:43 am 
Offline
User
User

Joined: Tue Mar 16, 2010 9:28 pm
Posts: 54
I can't use any of the gnozal because of the MISC missing.
1 of the most useful lib put away by purebasic, that's the first time i see that.

Gnozal, if you read this, please help us :cry:


Top
 Profile  
Reply with quote  
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Thu Oct 17, 2013 10:11 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Oct 04, 2003 12:57 pm
Posts: 269
Location: Germany
+1 :D


[Edit]
No answer is also any answer :(
But I'm hoping that will come a new version for PB 5.20+
[/Edit]

_________________
www.falko-pure.de
Win8 Pro 64-Bit & Mediacenter, PB_5.1B7, GFA-WinDOS, Powerbasic9.05-Windows, NSBasic/CE, NSBasic/Desktop, NSBasic4APP, EmergenceBasic


Last edited by Falko on Tue Jan 21, 2014 11:02 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Tue Jan 21, 2014 10:58 pm 
Offline
User
User

Joined: Thu Sep 19, 2013 8:23 am
Posts: 14
It does not seem to be true :(
Anyone know why?


Top
 Profile  
Reply with quote  
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Tue Jan 21, 2014 11:09 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5761
Location: Wales, UK
PureSMTP is excellent, I have used it a lot. However, ts-soft has published an equally good solution which has been enhanced by a number of people: http://www.purebasic.fr/english/viewtopic.php?f=12&t=50538

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Wed Jan 22, 2014 12:29 am 
Offline
User
User

Joined: Thu Sep 19, 2013 8:23 am
Posts: 14
Thx for the tipp. First tests look great. :D


Top
 Profile  
Reply with quote  
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Mon Apr 14, 2014 4:01 pm 
Offline
User
User

Joined: Mon Jun 06, 2011 8:28 am
Posts: 16
Hi, can someone help me to fix the code ..
... how can I send mail in HTML with Attachment .. better look at screenshots to understand my problem.

ImageImage

.. with attachment .. I have problems ??!!!

The Code:
Code:
; Header -----------------------------------------------------
MsgBody.s = ""
MsgBody + "<div style='background-color:#F0F8FF;font-family:verdana;padding:6px;border-radius:3px;border:2px solid #72B68F;'>"
MsgBody + "<h3 style='text-align:center;color:Green;'><ins> TEST </ins></h3>"
; """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

; Window Header -----------------------------------------------
MsgBody + "<div style='opacity:0.9;background-color: #72B68F; border-radius:3px;border:1px solid #505050; padding: 5px;'>"
MsgBody + "<font size='2' color='#000000'><i><b> NAME1: </b></i></font>"
MsgBody + "<font size='2' color='#FFFFFF'><i><b> TEXT1  </b></i></font><br/>"
MsgBody + "<font size='2' color='#000000'><i><b> NAME2: </b></i></font>"
MsgBody + "<font size='2' color='#FFFFFF'><i><b> TEXT2  </b></i></font><br/>"
MsgBody + "<font size='2' color='#000000'><i><b> NAME3: </b></i></font>"
MsgBody + "<font size='2' color='#FFFFFF'><i><b> TEXT3  </b></i></font><br/></div>"
; """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

; Text ...
MsgBody + "<font size='2' color='#000000'><i><b>" + "owiefwehuiuyuiyiuuiyiuHGUIUHIUIHUIHГШНРПГШЕКВАНЩОШОШЩОшщущгксвыьдацзщ89е7у90-ш4сждычсагшЭ." + "</b></i></font>"
MsgBody + "<br/>"




MySMTPServer.s = "mail.rambler.ru"
MySMTPPort.l   = 587
MailTo.s       = "pure-test@rambler.ru"
MailFrom.s     = "pure-test@rambler.ru"
Subject.s      = "Test (with attachments)"
Username.s     = MailFrom
Password.s     = "test1234"


Attachment$ = ""; "d:\1.jpg"


If PureSMTP_OpenSMTPConnection(MySMTPServer, MySMTPPort) = #PureSMTP_Ok
 
  PureSMTP_SetXMailer("Testemail")
  ;PureSMTP_SetContentType("multipart/alternative; charset=UTF-8")
  PureSMTP_SetContentType("text/html; charset=windows-1251")
  PureSMTP_AddHeader("X-MSMail-Priority", "Normal")
 
  Head$ = "<head><meta http-equiv="+Chr(34)+"Content-Type"+Chr(34)+" content="+Chr(34)+"text/html; charset=windows-1251"+Chr(34)+"></head><body>"
  Footer$ = "</div></body></html>"
  Message$ + Head$ + MsgBody + Footer$
 
  Status = PureSMTP_SendMail(MailTo, MailFrom, Subject, Message$, Attachment$, Username, Password, "Content-Type: text/html; charset=windows-1251")
  If Status = #PureSMTP_Ok
   
    Title$   = "Success"
    Msg$   = PureSMTP_GetLastServerMessage()
    MessageRequester(Title$, Msg$, #PB_MessageRequester_Ok | #MB_ICONINFORMATION)
   
  Else
    Title$   = "Error"
    Msg$   = "Sendmail error code: " +Str(Status) + Chr(10) + PureSMTP_GetLastServerMessage()
    MessageRequester(Title$, Msg$, #PB_MessageRequester_Ok | #MB_ICONERROR)
  EndIf
 
Else
  Title$   = "Error"
  Msg$   = "OpenSMTP error: " + Chr(10) + PureSMTP_GetLastServerMessage()
  MessageRequester(Title$, Msg$, #PB_MessageRequester_Ok | #MB_ICONERROR)
EndIf



.... the body text is in cyrillic (1251).

Thankyou.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Mon Apr 14, 2014 8:19 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5761
Location: Wales, UK
Well, I would say ensure that your output is Unicode, but you must have had a problem with that as you have commented-out that content type. I assume you mean that without an attachment, the code works fine? I just tried to test it in PB4.61 and get an error, but that might have something to do with Avast AV not liking PB4.61.

I don't think you can go far with PureSMTP, it's not supported for PB5.22 and gnozal has been away from the forum for some time now...... have you tried an alternative?

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Mon Apr 14, 2014 8:28 pm 
Offline
User
User

Joined: Mon Jun 06, 2011 8:28 am
Posts: 16
IdeasVacuum wrote:
Well, I would say ensure that your output is Unicode, but you must have had a problem with that as you have commented-out that content type. I assume you mean that without an attachment, the code works fine? I just tried to test it in PB4.61 and get an error, but that might have something to do with Avast AV not liking PB4.61.

I don't think you can go far with PureSMTP, it's not supported for PB5.22 and gnozal has been away from the forum for some time now...... have you tried an alternative?



can suggest me some a good mail library ... ... ?


Top
 Profile  
Reply with quote  
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Mon Apr 14, 2014 8:38 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5761
Location: Wales, UK
Have a look at ts-soft's: http://www.purebasic.fr/english/viewtopic.php?f=12&t=50538

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Mon Apr 14, 2014 8:41 pm 
Offline
User
User

Joined: Mon Jun 06, 2011 8:28 am
Posts: 16
IdeasVacuum wrote:



thank you .. i'll try.

UPD: thank you .. work now perfect :).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 370 posts ]  Go to page Previous  1 ... 21, 22, 23, 24, 25

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye